I am trying to Automate API that has multipart upload. I am getting 415.
Scenario:
* def Json = {}
* def multiPartText = read(Test.txt)
* def multiPartPng = read(Test.png)
* def multiPartJpg = read(Test.jpg)
When path 'Path'
And multipart field text = multiPartText
And multipart file jpg = { read: 'path/Test.jpg', filename: 'Test.jpg', content-Type: 'image/jpg'}
And header Content-Type = 'multipart/form-data'
And method POST
Then 201
this is what I written but I am getting 415.
Error:
content-disposition: form data; name= "info"; filename=""
content-type: text/plain
content length: 500
Completed: true
IsinMemory: true
Mixed content-disposition: from-data; name="file"; filename="Test.jpg"
content-type: image/jpg
content length: 500
Completed: true
IsinMemory: false >> Note: Path is correct and jpg in the framework.
Any one knows why? or How to solve it?