-
Notifications
You must be signed in to change notification settings - Fork 52
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
Withmultipart_formdata is not accepting json payload #380
Comments
Hello @JyotiPMallick , is the If so, we need to use spec.withMultiPartFormData({ '@DATA:TEMPLATE@': 'RegisterCompany' }) |
You mean something like |
addSpecHandler("Register a new company", ({ spec }) => {
spec.post(paths.COMPANY_REGISTRATION);
spec.withMultiPartFormData({ companyDto: {"@DATA:TEMPLATE@": "RegisterCompany" }});
spec.expectStatus(200);
}); I am getting |
Can you please share the stack trace of the error. |
Here it is |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
I am trying to make a post call with accept multipart form data, and one of its parameters (this one is mandatory) is only accepting JSON payload. But the spec handler is unable to identify the JSON data.
To Reproduce
Steps to reproduce the behavior:
My spec handler :
My JSON payload which contains some synthetic data produced through function,
Now while running I am getting the below error,
Same thing from the browser
Expected behavior
It should add the details.
Software (please complete the following information):
Any clue what I am missing here ?
The text was updated successfully, but these errors were encountered: