POST request at for getting access tokens is working well, but GET request at for gettind any data only recieve
I tried dozens of http-request libraries - all with the same result.
The code:

var options = {
	host: '',
	method: 'GET',
	path: '/v2/characters/'+charID+'/online/?datasource=tranquility',
	headers: {
		'Host': '',
		'Authorization': 'Bearer ' + token
var request_test = https.request(options, function (response) {
	response.on('data', function (data) {
		console.log(BODY: ${data});
	response.on('end', function () {
request_test.on('error', function (e) {
	console.log('Problem with request: ' + e.message);

I tried different headers, different styles of URL-formatting, http/httpS, google said it can be proxy - i tried adding it too.

This does not work for me either, I get the same error but I don’t actually know anything about the module you are using… so here is a different one :stuck_out_tongue:

For requests I use request-promise. A request can then look something like this:

const rp = require('request-promise');

let token = 'XXXX';
let charID = 0000000;

let options = {
    uri: '' + charID + '/industry/jobs/',
    method: 'GET',
    headers: {
        'Authorization': 'Bearer ' + token


Maybe you can get it to work with this request module.

I tried request module and its the only one that workes with POST.

request-promise also works with POST.

'Authorization': 'Bearer ' + token
Should probably be
'Authorization: Bearer ' + token

If so there must be ‘Bad request’, but no answer at all.

This is a networking issue, your connections to the cdn are not going through.

Are you reusing your client or making a new connection for each request? If you make too many connections in a time period to the cdn, you will get blacklisted temporarily.

It could also be the bad header as suggested above causing a protocol error.

Exactly the same code is working greate at the home computer, but not at the server.
I guess it can be nginx config problem.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.