Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prism proxy does not support GET/HEAD requests with bodies #2259

Open
daniel-white opened this issue Apr 12, 2023 · 0 comments
Open

Prism proxy does not support GET/HEAD requests with bodies #2259

daniel-white opened this issue Apr 12, 2023 · 0 comments

Comments

@daniel-white
Copy link
Member

Per the HTTP specifications, request bodies are discouraged for GET, HEAD and DELETE. Internally, Prism does not support this in proxy mode due to using the node-fetch package which conforms to the fetch standard. Prism will return PROXY_UNSUPPORTED_REQUEST_BODY when this is detected and not call the upstream server. Prism assumes are request body exists if either the Content-Length or Transfer-Encoding headers are specified.

If you desire this behavior and have a willingness for a pull request, packages/http/src/forwarder/index.ts would need to use another HTTP client, perhaps Node's http/https directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants