Multipart request with few parameters #1398
Unanswered
SilverPlate3
asked this question in
Q&A
Replies: 1 comment
-
Hi!
|
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
-
I don't think the following can be done:
I have an API request I need to do
curl -X 'POST'
'https://www.hybrid-analysis.com/api/v2/quick-scan/file'
-H 'accept: application/json'
-H 'user-agent: Mozilla 5.0'
-H 'api-key: p36a6qk6119e21dfxf2repsy918df0b2mt5cifpra922df944eg2iim292b1f961'
-H 'Content-Type: multipart/form-data'
-F 'scan_type=all'
-F '[email protected];type=application/pdf'
Because the Multipart takes two (at least) parameters I couldn't find a way to do it. Went through the full multipart documentation files.
I always get the error :
"{"validation_errors":[{"field":"scan_type","errors":["This value should not be blank."]},{"field":"file","errors":["This value should not be blank."]}],"message":"Input data validation has failed. Please check 'validation_errors' field to get more data."}"
You can see in the attached file some lines of my code (only the important ones)
Multipart.txt
Beta Was this translation helpful? Give feedback.
All reactions