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

Specify the Accepted Media Types #12

Open
MartinKersten opened this issue Sep 24, 2012 · 1 comment
Open

Specify the Accepted Media Types #12

MartinKersten opened this issue Sep 24, 2012 · 1 comment

Comments

@MartinKersten
Copy link
Member

For some requests an accept header must be set for accepting JSON or XML rather than HTML. This can be done using the do(url) method.

agent.do(url).accept("application/xml") for instance. Default is accepting html.

@MartinKersten
Copy link
Member Author

Example: agent.do("somesite.com/search?query=value&page=1").set("page", "2").get();

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

No branches or pull requests

1 participant