What is the expected shape of request.body
when POSTing multipart/form-data
?
#14535
Unanswered
samtsai
asked this question in
Questions and Help
Replies: 1 comment
-
Just discovered this form spec example, maybe a brief explanation and link to the example: https://github.com/cypress-io/cypress-example-recipes/blob/master/examples/stubbing-spying__intercept/cypress/integration/form-spec.js |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
With this recent fix #14235 for #9359 the request body is an ArrayBuffer vs previously a string.
My question is if this will change for any reason in the future? If not, maybe we should add details of intercepting
multipart/form-data
. In my case, we have a single API endpoint like GraphQL but instead ofPOST
ing JSON we have for legacy reasons toPOST
asmultipart/form-data
. I mimic the example https://docs.cypress.io/api/commands/intercept.html#Aliasing-individual-requests:My workaround when upgrading to
6.2.1
is to decode the buffer to a String:Related issue #14527
Beta Was this translation helpful? Give feedback.
All reactions