URI.encode_www_form({sort: [['valid.to', 'ASC']]})
"sort=%5B%22valid.to%22%2C+%22ASC%22%5D"
Typhoeus.get('http://localhost:7001/api/events.json', followlocation: true, params: {sort: ['valid.to', 'ASC']})
ETHON: performed EASY effective_url=http://localhost:7001/api/events.json?sort%5B0%5D=valid.to&sort%5B1%5D=ASC response_code=401 return_code=ok total_time=0.615747
#<Typhoeus::Response:0x007fa002253650 @options={:httpauth_avail=>0, :total_time=>0.615747, :starttransfer_time=>0.6155200000000001, :appconnect_time=>0.0, :pretransfer_time=>0.000918, :connect_time=>0.000875, :namelookup_time=>0.000634, :effective_url=>"http://localhost:7001/api/events.json?sort%5B0%5D=valid.to&sort%5B1%5D=ASC", :primary_ip=>"127.0.0.1", :response_code=>401, :request_size=>166, :redirect_count=>0, :return_code=>:ok, :response_headers=>"HTTP/1.1 401 Unauthorized\r\nServer: nginx/1.6.1\r\nDate: Thu, 04 Sep 2014 16:25:26 GMT\r\nContent-Type: application/json; charset=utf-8\r\nTransfer-Encoding: chunked\r\nConnection: keep-alive\r\nX-Frame-Options: SAMEORIGIN\r\nX-XSS-Protection: 1; mode=block\r\nX-Content-Type-Options: nosniff\r\nX-UA-Compatible: chrome=1\r\nCache-Control: no-cache\r\nX-Request-Id: 6d599988-6098-4996-8178-9f83bd1aded5\r\nX-Runtime: 0.613266\r\n\r\n", :response_body=>"{\"status\":\"error\",\"data\":\"translation missing: en.application.login_required\"}", :debug_info=>#<Ethon::Easy::DebugInfo:0x007fa0022dbbe0 @messages=[]>}, @request=#<Typhoeus::Request:0x007fa00225be90 @base_url="http://localhost:7001/api/events.json", @original_options={:followlocation=>true, :params=>{:sort=>["valid.to", "ASC"]}, :method=>:get}, @options={:followlocation=>true, :params=>{:sort=>["valid.to", "ASC"]}, :method=>:get, :headers=>{"User-Agent"=>"Typhoeus - https://github.com/typhoeus/typhoeus"}, :maxredirs=>50}, @on_headers=[], @response=#<Typhoeus::Response:0x007fa002253650 ...>, @on_complete=[], @on_failure=[]>>
RestClient.get('http://localhost:7001/api/events.json', {sort: ['valid.to', 'ASC']})
http://localhost:7001/api/bets.json?ignored=false&limit=100&offset=0&sort=%5B%5B%22event.valid_to%22,%20%22ASC%22%5D%5D&type=active")