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

gzip support .. please document it #304

Closed
mafar opened this issue Mar 26, 2016 · 1 comment
Closed

gzip support .. please document it #304

mafar opened this issue Mar 26, 2016 · 1 comment

Comments

@mafar
Copy link

mafar commented Mar 26, 2016

Hi,
After going through solutions like ones suggested at #270

I found that frisby already supports gzip by adding {gzip: true} in get() or post() methods.
This is a very key feature and should be documented as other solutions are very ugly which involve unzipping in .after()

Working Sample:

//seems to work well in my tests
.get('http://SOMEURL', {gzip: true})
  .expectStatus(200)

Usage:

  frisby.create('GET JSON data from an endpoint')
  .get('http://SOMEURL', {gzip: true})
  .expectStatus(200)
  .expectHeader('content-encoding', 'gzip')
  .expectHeader('Content-Type', 'application/json')
  .expectJSON({ 'url': 'SomeValue' })
.toss();
@sasikanth
Copy link
Contributor

Pull request for documentation added at vlucas/frisby-site#8

@vlucas vlucas closed this as completed Jul 26, 2017
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

3 participants