Skip to content

Commit

Permalink
get encoded response when calling works
Browse files Browse the repository at this point in the history
  • Loading branch information
kjgarza committed Mar 5, 2020
1 parent 605de58 commit b33c165
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ GEM
loofah (2.4.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
maremma (4.5)
activesupport (>= 4.2.5, < 6)
maremma (4.6.1)
activesupport (>= 4.2.5)
addressable (>= 2.3.6)
builder (~> 3.2, >= 3.2.2)
excon (~> 0.71.0)
Expand Down Expand Up @@ -267,4 +267,4 @@ DEPENDENCIES
will_paginate-bootstrap!

BUNDLED WITH
2.1.2
2.1.4
4 changes: 2 additions & 2 deletions lib/api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ def get_works(params = {})

url = "#{ENV['API_URL']}/works?" + URI.encode_www_form(params)
end
response = Maremma.get(url, timeout: TIMEOUT)

response = Maremma.get(url, headers: { "Accept-Encoding"=> "gzip" }, timeout: TIMEOUT)
{ data: response.body.fetch("data", []),
included: response.body.fetch("included", []),
errors: Array(response.body.fetch("errors", [])),
Expand Down

0 comments on commit b33c165

Please # to comment.