I am trying to update feature file via zip with java unirest. But i got response status 500. The same zip file post via Postman is working fine.
HttpResponse<String> response = Unirest.post("https://xray.cloud.xpand-it.com/api/v1/import/feature?projectKey=OBH")
.header("content-type", "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW")
.header("Content-Type", "application/x-www-form-urlencoded")
.header("Authorization", "Bearer "+accessToken)
.header("Connection", "keep-alive")
.header("cache-control", "no-cache")
.body("------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"file\"; filename=\"D:\\fo.zip\"\r\nContent-Type: application/zip\r\n\r\n\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--")
.asString();
Is it something wrong on the Unirest post body?
Hi lekean,
Here you can find all information about our REST API, specially all the endpoints that can be used and the how-to to do these endpoints. And here you can find information about import multiple executions results by using a ZIP file.
The 500 error means that an internal error occurred when importing execution results.
I suggest you to take a look into our documentation and if the problem persists, please use the support channel to share all of your questions with us.
Best regards,
Xray Team
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.