I created a simple table that consumes AppNexus api's and gets list of all publishers
>>
create table MyAN_getAllPublishers
on select get from "
http://sand.api.appnexus.com/publisher"
using headers 'Authorization'='{token}';
select * from MyAN_getAllPublishers
where token=lfatvle7t8mi1er50j4s2027u0;
AppNexus requires token for each api call in header as i have done in create table.
Now when i query with correct token then it gives me the correct output.
When i use token which is expired, then the appnexus site give 401 as HTTP status code and response giving details.
But
ql.io gives me 400 Bad Request as HTTP status code and response embedded in body record along with some header record and
"emitted":
true.
Response from AppNexus:
{
"response" :
{
"error_id" : "NOAUTH",
"error" : "Authentication failed - not logged in",
"error_description" : null,
"service" : null,
"method" : null,
"error_code" : null,
"dbg_info" :
{
"instance" : "09.hbapi.sand-08.ams1",
"slave_hit" : false,
"db" : "master",
"awesomesauce_cache_used" : false,
"warnings" : [],
"time" : 25.92921257019,
"start_microtime" : 1354697253.6361,
"version" : "1.13.4.3"
}
}
}
Response from
ql.io{
- "headers": {
- "content-type": "application/json"
}, - "body": {
- "response": {
- "error_id": "NOAUTH",
- "error": "Authentication failed - not logged in",
- "error_description": null,
- "service": null,
- "method": null,
- "error_code": null,
- "dbg_info": {}
}
}, - "emitted": true
}
Although i can see status response of 401 from AppNexus in Req/resp traces.
Any help will be deeply appreciated.
PFA: Screenshot of
ql.io along with Req/resp traces