Skip to content
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

Rest assured throw "Unable to parse file download locator" when trying to download an xlsx file using POST. #1789

Open
johnysv opened this issue May 6, 2024 · 0 comments

Comments

@johnysv
Copy link

johnysv commented May 6, 2024

I have an file xlsx download scenario which I am trying to accomblish using rest assured. Below is my code where I pass two values as formParam.

public Response downloadQRTExcelExports(TestDataE2E testDataE2E,final String resource, String contentType) {
LOG.debug("POSTing {}", resource);
return given()
.accept("text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,/;q=0.8")
.contentType(contentType)
.formParam("filename","RC020_BASE_scenariotest_36.xlsx")
.formParam("uri","/229406489/1611000000000107")
.when()
.post(resource).andReturn();

}

But I get the below response with 400. Kindly help.

Unable to parse file download locator.

The request/response as seen in network tab is.
The access token in form data is same which i pass as Bearer token.

image

image

image

Am I missing something here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant