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

If json: false is set, then response is not interpreted as json. #101

Open
partounian opened this issue Jun 27, 2017 · 1 comment
Open

Comments

@partounian
Copy link

partounian commented Jun 27, 2017

For example, the snippet below fails due to the response not being interpreted as JSON.

return chakram.post(apiUrl, photo, { json: false })
     .then(function(postResponse) {
       expect(postResponse).to.have.json(imageUrl);
     });
@sakanaou
Copy link

This is to be expected as documented at https://dareid.github.io/chakram/jsdoc/global.html and https://github.com/request/request#requestoptions-callback. You should parse the body yourself.

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

2 participants