MCPcopy Create free account
hub / github.com/apify/impit / shouldRewriteRedirectToGet

Function shouldRewriteRedirectToGet

impit-node/index.wrapper.js:63–72  ·  view source on GitHub ↗
(httpStatus, method)

Source from the content-addressed store, hash-verified

61}
62
63function shouldRewriteRedirectToGet(httpStatus, method) {
64 // See https://github.com/mozilla-firefox/firefox/blob/911b3eec6c5e58a9a49e23aa105e49aa76e00f9c/netwerk/protocol/http/HttpBaseChannel.cpp#L4801
65 if ([301, 302].includes(httpStatus)) {
66 return method === 'POST';
67 }
68
69 if (httpStatus === 303) return method !== 'HEAD';
70
71 return false;
72}
73
74class Impit extends native.Impit {
75 #cookieJar;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…