Skip to content

fix: handle empty request bodies #327

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

Merged
merged 1 commit into from
May 8, 2024

Conversation

cloudnautique
Copy link
Contributor

Some apis don't require content in the request body. If that was the case the current implementation doesn't send a header or the empty body.

This change makes it so the empty json and string bodies and headers are sent.

note: need to discuss if there is a scenario for empty multipart form data.

Some apis don't require content in the request body. If that was
the case the current implementation doesn't send a header or the
empty body.

This change makes it so the empty json and string bodies and
headers are sent.

Still need to look at the multipart content.

Signed-off-by: Bill Maxwell <[email protected]>
@cloudnautique cloudnautique requested a review from g-linville May 8, 2024 15:49
@cloudnautique cloudnautique merged commit 20fc0e7 into gptscript-ai:main May 8, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants