Created
August 13, 2014 19:41
-
-
Save tstachl/db12d8ec211e51adb296 to your computer and use it in GitHub Desktop.
DeskApi Timeout fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'desk_api' | |
DeskApi::Default::CONNECTION_OPTIONS[:request] = { | |
open_timeout: 45, | |
timeout: 45 | |
} | |
client = DeskApi::Client.new({ | |
token: 'TOKEN', | |
token_secret: 'TOKEN_SECRET', | |
consumer_key: 'CONSUMER_KEY', | |
consumer_secret: 'CONSUMER_SECRET', | |
endpoint: 'https://example.desk.com' | |
}) | |
response = client.post('/api/v2/insights/reports', { resolution: 'weeks' }).body |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment