@zimic/interceptor 0.17.3 → 0.18.0-canary.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/http.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import color2 from 'picocolors';
2
- import { HttpHeaders, HttpSearchParams, HttpFormData, HTTP_METHODS, HTTP_METHODS_WITH_RESPONSE_BODY } from '@zimic/http';
2
+ import { HttpHeaders, HttpSearchParams, HttpFormData, HTTP_METHODS } from '@zimic/http';
3
3
  import { http, passthrough } from 'msw';
4
4
  import * as mswBrowser from 'msw/browser';
5
5
  import * as mswNode from 'msw/node';
@@ -954,9 +954,16 @@ function removeArrayElement(array, element) {
954
954
  return removeArrayIndex(array, index);
955
955
  }
956
956
  __name(removeArrayElement, "removeArrayElement");
957
+ var HTTP_METHODS_WITH_RESPONSE_BODY = /* @__PURE__ */ new Set([
958
+ "GET",
959
+ "POST",
960
+ "PUT",
961
+ "PATCH",
962
+ "DELETE",
963
+ "OPTIONS"
964
+ ]);
957
965
  function methodCanHaveResponseBody(method) {
958
- const methodsToCompare = HTTP_METHODS_WITH_RESPONSE_BODY;
959
- return methodsToCompare.includes(method);
966
+ return HTTP_METHODS_WITH_RESPONSE_BODY.has(method);
960
967
  }
961
968
  __name(methodCanHaveResponseBody, "methodCanHaveResponseBody");
962
969