Describe the bug
Unable to use form data in body to upload file. I am trying to use Unirest to add attachment to the test rail (test management tool). Curl code looks like this and if someone could help me with the corresponding unirest code, it will be helpful.
Describe the bug Unable to use form data in body to upload file. I am trying to use Unirest to add attachment to the test rail (test management tool). Curl code looks like this and if someone could help me with the corresponding unirest code, it will be helpful.
$ curl -H "Content-Type: multipart/form-data" \ -u "user@example.com:" \ -F "attachment=@C:\image.jpg" \ "https://example.testrail.io/index.php?/api/v2/add_attachment_to_result/1
In postman, it looks something like this.
I tried below ways in unirest and nothing worked.
All I could get was 400 bad request (POST request not formatted properly or invalid result ID)
Expected behavior I should be able to to add attachment to test rail via unirest
Screenshots If applicable, add screenshots to help explain your problem.
Environmental Data:
Additional context https://www.gurock.com/testrail/docs/api/getting-started/accessing/#ExampleAttachmentUpload