Skip to content

Commit

Permalink
Do not use gzip
Browse files Browse the repository at this point in the history
  • Loading branch information
imustafin committed Aug 16, 2020
1 parent d78c86a commit 223c18c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions lib/textrazor/request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ class Request
def self.post(text, options)
::RestClient.post(
TextRazor.configuration.url,
build_query(text, options),
accept_encoding: 'gzip'
build_query(text, options)
)
end

Expand Down
5 changes: 2 additions & 3 deletions spec/lib/textrazor/request_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module TextRazor

expect(::RestClient).to receive(:post).
with("https://api.textrazor.com", { "text" => 'text', "apiKey" => 'api_key',
"extractors" => "entities,topics,words,dependency-trees,relations,entailments" }, accept_encoding: 'gzip')
"extractors" => "entities,topics,words,dependency-trees,relations,entailments" })

Request.post('text', options)
end
Expand All @@ -32,8 +32,7 @@ module TextRazor
with("https://api.textrazor.com", { "text" => 'text', "apiKey" => 'api_key', "extractors" => "entities,topics,words",
"cleanup.mode" => "raw", "cleanup.returnCleaned" => true, "cleanup.returnRaw" => true, "languageOverride" => 'fre',
"entities.filterDbpediaTypes" => "type1", "entities.filterFreebaseTypes" => "type2" , "entities.allowOverlap" => false,
"entities.enrichmentQueries" => "queries", "classifiers" => 'textrazor_iab'},
accept_encoding: 'gzip')
"entities.enrichmentQueries" => "queries", "classifiers" => 'textrazor_iab'})

Request.post('text', options)
end
Expand Down

0 comments on commit 223c18c

Please sign in to comment.