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

Unexpected error with multipart request #75

Open
martinklepsch opened this issue Dec 29, 2024 · 1 comment
Open

Unexpected error with multipart request #75

martinklepsch opened this issue Dec 29, 2024 · 1 comment

Comments

@martinklepsch
Copy link

I'm not sure if this is expected but I was working with an API expecting a multipart upload and it tripped up whenever I would set the content type header according to the documentation. The below snippet exhibits the same behavior.

Not setting the content type header resulted in a successful request.

I don't fully understand why but thought I'd raise as feedback.

(http/post "https://postman-echo.com/post"
           {:headers {"Content-Type" "multipart/form-data"}  ; < -- this made the request fail
            :multipart [{:name "title" :content "My Title"}
                        {:name "file" :content (io/file test-file) }]})
@borkdude
Copy link
Contributor

I'm not familiar with this API but what was the error you got back from the API?

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

No branches or pull requests

2 participants