2010-06-09 19:00:41 -04:00
|
|
|
Feature: Handles Compressed Responses
|
|
|
|
|
|
|
|
In order to save bandwidth
|
|
|
|
As a developer
|
|
|
|
I want to uncompress compressed responses
|
|
|
|
|
|
|
|
Scenario: Supports deflate encoding
|
|
|
|
Given a remote deflate service
|
|
|
|
And the response from the service has a body of '<h1>Some HTML</h1>'
|
2010-07-07 08:54:22 -04:00
|
|
|
And that service is accessed at the path '/deflate_service.html'
|
|
|
|
When I call HTTParty#get with '/deflate_service.html'
|
2010-06-09 19:00:41 -04:00
|
|
|
Then the return value should match '<h1>Some HTML</h1>'
|
2010-06-12 00:41:11 -04:00
|
|
|
|
|
|
|
Scenario: Supports gzip encoding
|
|
|
|
Given a remote gzip service
|
|
|
|
And the response from the service has a body of '<h1>Some HTML</h1>'
|
2010-07-07 08:54:22 -04:00
|
|
|
And that service is accessed at the path '/gzip_service.html'
|
|
|
|
When I call HTTParty#get with '/gzip_service.html'
|
2010-06-12 00:41:11 -04:00
|
|
|
Then the return value should match '<h1>Some HTML</h1>'
|