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

Document how to do file upload or multipart/form-data #307

Open
franz-see opened this issue Sep 21, 2022 · 6 comments
Open

Document how to do file upload or multipart/form-data #307

franz-see opened this issue Sep 21, 2022 · 6 comments

Comments

@franz-see
Copy link

I cannot find any information on how to do file upload with pact-python for consumer test. Kindly advice

@pegas511
Copy link

pegas511 commented Sep 21, 2022

Faced with the same, it's strange that JVM and JS has the solution to upload multipart and python does not

@mefellows
Copy link
Member

It's because the current Ruby core that we use in Python doesn't support it, but the rust core does.

See this doc for how to do it in the meantime: https://docs.pact.io/faq#how-do-i-test-binary-files-in-responses-such-as-a-download

@franz-see
Copy link
Author

@mefellows that seems to be binary responses. Not sure how to translate that to binary requests

@mefellows
Copy link
Member

mefellows commented Sep 21, 2022 via email

@franz-see
Copy link
Author

@mefellows curious, how come java, .net and js can do it? because they're in rust?

@mefellows
Copy link
Member

mefellows commented Sep 22, 2022 via email

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 a pull request may close this issue.

4 participants