goferito / node-bing-api

Node.js module for the Bing Search API (Cognitive Services)
MIT License
56 stars 28 forks source link

The request resulted in a backend time out or backend error. #16

Closed martynasb closed 8 years ago

martynasb commented 9 years ago

Hi,

As of 1PM today I started getting the following error in response.body: "The request resulted in a backend time out or backend error. The team is investigating the issue. We are sorry for the inconvenience". HOWEVER, sometimes (1 in 50 times) it works just fine.

Here's what Microsoft say about this kind of error: https://azure.microsoft.com/en-us/documentation/articles/machine-learning-marketplace-faq/ Your input parameter(s) may not conform to the required format for the specific web service. Please refer to the corresponding documentation link to find the correct format for input parameters and the limitations of this web service.

I checked my other app which is running on Django and does not use a plugin to connect to Bing Search and it's working fine. Any ideas?

Code (additional functions included just for reference):

exports.searchWeb = function(req, res) {
    var searchQuery = req.query.query || '';

    Bing.web(searchQuery, constructOptions(req.query), function(error, response, body){
        console.log(response);
        res.status(200).json(removeMetadata(body.d.results));
    });
};

var constructOptions = function(params) {
    // User defined
    var top = parseInt(params.top, 10) || 50;
    var skip = parseInt(params.skip, 10) || 0;

    // System defined
    var market = 'en-GB';

    return {
        top: top,
        skip: skip
    };
};

var removeMetadata = function(results) {
    for (var i = 0; i < results.length; i++) {
        if (results[i]['__metadata']['type'] === 'VideoResult') {
            delete results[i]['DisplayUrl'];
        }
        delete results[i]['__metadata'];
        delete results[i]['ID'];
        if (results[i].hasOwnProperty('Thumbnail')) {
            delete results[i]['Thumbnail']['__metadata'];
        }
    }
    return results;
};

Response:

15:05:31 web.1    | IncomingMessage {
15:05:31 web.1    |   _readableState: 
15:05:31 web.1    |    ReadableState {
15:05:31 web.1    |      objectMode: false,
15:05:31 web.1    |      highWaterMark: 16384,
15:05:31 web.1    |      buffer: [],
15:05:31 web.1    |      length: 0,
15:05:31 web.1    |      pipes: null,
15:05:31 web.1    |      pipesCount: 0,
15:05:31 web.1    |      flowing: true,
15:05:31 web.1    |      ended: true,
15:05:31 web.1    |      endEmitted: true,
15:05:31 web.1    |      reading: false,
15:05:31 web.1    |      sync: true,
15:05:31 web.1    |      needReadable: false,
15:05:31 web.1    |      emittedReadable: false,
15:05:31 web.1    |      readableListening: false,
15:05:31 web.1    |      defaultEncoding: 'utf8',
15:05:31 web.1    |      ranOut: false,
15:05:31 web.1    |      awaitDrain: 0,
15:05:31 web.1    |      readingMore: false,
15:05:31 web.1    |      decoder: null,
15:05:31 web.1    |      encoding: null,
15:05:31 web.1    |      resumeScheduled: false },
15:05:31 web.1    |   readable: false,
15:05:31 web.1    |   domain: null,
15:05:32 web.1    |   _events: 
15:05:32 web.1    |    { end: [ [Function: responseOnEnd], [Function], [Function], [Function] ],
15:05:32 web.1    |      close: [ [Function], [Function] ],
15:05:32 web.1    |      data: [Function],
15:05:32 web.1    |      error: [Function] },
15:05:32 web.1    |   _eventsCount: 4,
15:05:32 web.1    |   _maxListeners: undefined,
15:05:32 web.1    |   socket: 
15:05:32 web.1    |    TLSSocket {
15:05:32 web.1    |      _tlsOptions: 
15:05:32 web.1    |       { pipe: null,
15:05:32 web.1    |         secureContext: [Object],
15:05:32 web.1    |         isServer: false,
15:05:32 web.1    |         requestCert: true,
15:05:32 web.1    |         rejectUnauthorized: true,
15:05:32 web.1    |         session: undefined,
15:05:32 web.1    |         NPNProtocols: undefined,
15:05:32 web.1    |         requestOCSP: undefined },
15:05:32 web.1    |      _secureEstablished: true,
15:05:32 web.1    |      _securePending: false,
15:05:32 web.1    |      _newSessionPending: false,
15:05:32 web.1    |      _controlReleased: true,
15:05:32 web.1    |      _SNICallback: null,
15:05:32 web.1    |      servername: null,
15:05:32 web.1    |      npnProtocol: undefined,
15:05:32 web.1    |      authorized: true,
15:05:32 web.1    |      authorizationError: null,
15:05:32 web.1    |      encrypted: true,
15:05:32 web.1    |      _events: 
15:05:32 web.1    |       { close: [Object],
15:05:32 web.1    |         end: [Object],
15:05:32 web.1    |         finish: [Function: onSocketFinish],
15:05:32 web.1    |         _socketEnd: [Function: onSocketEnd],
15:05:32 web.1    |         secure: [Function],
15:05:32 web.1    |         free: [Function: onFree],
15:05:32 web.1    |         agentRemove: [Function: onRemove],
15:05:32 web.1    |         drain: [Function: ondrain],
15:05:32 web.1    |         error: [Object],
15:05:32 web.1    |         timeout: [Object] },
15:05:32 web.1    |      _eventsCount: 10,
15:05:32 web.1    |      _connecting: false,
15:05:32 web.1    |      _hadError: false,
15:05:32 web.1    |      _handle: null,
15:05:32 web.1    |      _parent: null,
15:05:32 web.1    |      _host: 'api.datamarket.azure.com',
15:05:32 web.1    |      _readableState: 
15:05:32 web.1    |       ReadableState {
15:05:32 web.1    |         objectMode: false,
15:05:32 web.1    |         highWaterMark: 16384,
15:05:32 web.1    |         buffer: [],
15:05:32 web.1    |         length: 0,
15:05:32 web.1    |         pipes: null,
15:05:32 web.1    |         pipesCount: 0,
15:05:32 web.1    |         flowing: true,
15:05:32 web.1    |         ended: false,
15:05:32 web.1    |         endEmitted: false,
15:05:32 web.1    |         reading: true,
15:05:32 web.1    |         sync: false,
15:05:32 web.1    |         needReadable: true,
15:05:32 web.1    |         emittedReadable: false,
15:05:32 web.1    |         readableListening: false,
15:05:32 web.1    |         defaultEncoding: 'utf8',
15:05:32 web.1    |         ranOut: false,
15:05:32 web.1    |         awaitDrain: 0,
15:05:32 web.1    |         readingMore: false,
15:05:32 web.1    |         decoder: null,
15:05:32 web.1    |         encoding: null,
15:05:32 web.1    |         resumeScheduled: false },
15:05:32 web.1    |      readable: false,
15:05:32 web.1    |      domain: null,
15:05:32 web.1    |      _maxListeners: 0,
15:05:32 web.1    |      _writableState: 
15:05:32 web.1    |       WritableState {
15:05:32 web.1    |         objectMode: false,
15:05:32 web.1    |         highWaterMark: 16384,
15:05:32 web.1    |         needDrain: false,
15:05:32 web.1    |         ending: true,
15:05:32 web.1    |         ended: true,
15:05:32 web.1    |         finished: true,
15:05:32 web.1    |         decodeStrings: false,
15:05:32 web.1    |         defaultEncoding: 'utf8',
15:05:32 web.1    |         length: 0,
15:05:32 web.1    |         writing: false,
15:05:32 web.1    |         corked: 0,
15:05:32 web.1    |         sync: false,
15:05:32 web.1    |         bufferProcessing: false,
15:05:32 web.1    |         onwrite: [Function],
15:05:32 web.1    |         writecb: null,
15:05:32 web.1    |         writelen: 0,
15:05:32 web.1    |         bufferedRequest: null,
15:05:32 web.1    |         lastBufferedRequest: null,
15:05:32 web.1    |         pendingcb: 0,
15:05:32 web.1    |         prefinished: true,
15:05:32 web.1    |         errorEmitted: false },
15:05:32 web.1    |      writable: false,
15:05:32 web.1    |      allowHalfOpen: false,
15:05:32 web.1    |      destroyed: true,
15:05:32 web.1    |      bytesRead: 819,
15:05:32 web.1    |      _bytesDispatched: 324,
15:05:32 web.1    |      _sockname: null,
15:05:32 web.1    |      _pendingData: null,
15:05:32 web.1    |      _pendingEncoding: '',
15:05:32 web.1    |      ssl: 
15:05:32 web.1    |       TLSWrap {
15:05:32 web.1    |         _externalStream: {},
15:05:32 web.1    |         fd: -22,
15:05:32 web.1    |         _parent: [Object],
15:05:32 web.1    |         _parentWrap: undefined,
15:05:32 web.1    |         _secureContext: [Object],
15:05:32 web.1    |         reading: true,
15:05:32 web.1    |         owner: [Circular],
15:05:32 web.1    |         onread: [Function: noop],
15:05:32 web.1    |         writeQueueSize: 1,
15:05:32 web.1    |         onhandshakestart: [Function],
15:05:32 web.1    |         onhandshakedone: [Function: bound ],
15:05:32 web.1    |         onocspresponse: [Function: bound onocspresponse],
15:05:32 web.1    |         onerror: [Function] },
15:05:32 web.1    |      server: undefined,
15:05:32 web.1    |      _requestCert: true,
15:05:32 web.1    |      _rejectUnauthorized: true,
15:05:32 web.1    |      parser: null,
15:05:32 web.1    |      _httpMessage: 
15:05:32 web.1    |       ClientRequest {
15:05:32 web.1    |         domain: null,
15:05:32 web.1    |         _events: [Object],
15:05:32 web.1    |         _eventsCount: 5,
15:05:32 web.1    |         _maxListeners: undefined,
15:05:32 web.1    |         output: [],
15:05:32 web.1    |         outputEncodings: [],
15:05:32 web.1    |         outputCallbacks: [],
15:05:32 web.1    |         outputSize: 0,
15:05:32 web.1    |         writable: true,
15:05:32 web.1    |         _last: true,
15:05:32 web.1    |         chunkedEncoding: false,
15:05:32 web.1    |         shouldKeepAlive: false,
15:05:32 web.1    |         useChunkedEncodingByDefault: false,
15:05:32 web.1    |         sendDate: false,
15:05:32 web.1    |         _removedHeader: {},
15:05:32 web.1    |         _contentLength: 0,
15:05:32 web.1    |         _hasBody: true,
15:05:32 web.1    |         _trailer: '',
15:05:32 web.1    |         finished: true,
15:05:32 web.1    |         _headerSent: true,
15:05:32 web.1    |         socket: [Circular],
15:05:32 web.1    |         connection: [Circular],
15:05:32 web.1    |         _header: 'GET /Bing/Search/v1/Web?$format=json&Query=%27facebook%27&$top=50&$skip=0 HTTP/1.1\r\nUser-Agent: Bing Search Client for Node.js\r\nhost: api.datamarket.azure.com\r\nauthorization: Basic N1ZlZFJLTGFFeTc5dGt0K2hYa3VLVm82cFN5bEo5aituQUtTMVQrN3ZKUT06N1ZlZFJLTGFFeTc5dGt0K2hYa3VLVm82cFN5bEo5aituQUtTMVQrN3ZKUT0=\r\nConnection: close\r\n\r\n',
15:05:32 web.1    |         _headers: [Object],
15:05:32 web.1    |         _headerNames: [Object],
15:05:32 web.1    |         _onPendingData: null,
15:05:32 web.1    |         agent: [Object],
15:05:32 web.1    |         socketPath: undefined,
15:05:32 web.1    |         method: 'GET',
15:05:32 web.1    |         path: '/Bing/Search/v1/Web?$format=json&Query=%27facebook%27&$top=50&$skip=0',
15:05:32 web.1    |         timeoutCb: [Function: emitTimeout],
15:05:32 web.1    |         parser: null,
15:05:32 web.1    |         res: [Circular] },
15:05:32 web.1    |      _idleTimeout: -1,
15:05:32 web.1    |      _idleNext: null,
15:05:32 web.1    |      _idlePrev: null,
15:05:32 web.1    |      _idleStart: 5636,
15:05:32 web.1    |      read: [Function],
15:05:32 web.1    |      _consuming: true },
15:05:32 web.1    |   connection: 
15:05:32 web.1    |    TLSSocket {
15:05:32 web.1    |      _tlsOptions: 
15:05:32 web.1    |       { pipe: null,
15:05:32 web.1    |         secureContext: [Object],
15:05:32 web.1    |         isServer: false,
15:05:32 web.1    |         requestCert: true,
15:05:32 web.1    |         rejectUnauthorized: true,
15:05:32 web.1    |         session: undefined,
15:05:32 web.1    |         NPNProtocols: undefined,
15:05:32 web.1    |         requestOCSP: undefined },
15:05:32 web.1    |      _secureEstablished: true,
15:05:32 web.1    |      _securePending: false,
15:05:32 web.1    |      _newSessionPending: false,
15:05:32 web.1    |      _controlReleased: true,
15:05:32 web.1    |      _SNICallback: null,
15:05:32 web.1    |      servername: null,
15:05:32 web.1    |      npnProtocol: undefined,
15:05:32 web.1    |      authorized: true,
15:05:32 web.1    |      authorizationError: null,
15:05:32 web.1    |      encrypted: true,
15:05:32 web.1    |      _events: 
15:05:32 web.1    |       { close: [Object],
15:05:32 web.1    |         end: [Object],
15:05:32 web.1    |         finish: [Function: onSocketFinish],
15:05:32 web.1    |         _socketEnd: [Function: onSocketEnd],
15:05:32 web.1    |         secure: [Function],
15:05:32 web.1    |         free: [Function: onFree],
15:05:32 web.1    |         agentRemove: [Function: onRemove],
15:05:32 web.1    |         drain: [Function: ondrain],
15:05:32 web.1    |         error: [Object],
15:05:32 web.1    |         timeout: [Object] },
15:05:32 web.1    |      _eventsCount: 10,
15:05:32 web.1    |      _connecting: false,
15:05:32 web.1    |      _hadError: false,
15:05:32 web.1    |      _handle: null,
15:05:32 web.1    |      _parent: null,
15:05:32 web.1    |      _host: 'api.datamarket.azure.com',
15:05:32 web.1    |      _readableState: 
15:05:32 web.1    |       ReadableState {
15:05:32 web.1    |         objectMode: false,
15:05:32 web.1    |         highWaterMark: 16384,
15:05:32 web.1    |         buffer: [],
15:05:32 web.1    |         length: 0,
15:05:32 web.1    |         pipes: null,
15:05:32 web.1    |         pipesCount: 0,
15:05:32 web.1    |         flowing: true,
15:05:32 web.1    |         ended: false,
15:05:32 web.1    |         endEmitted: false,
15:05:32 web.1    |         reading: true,
15:05:32 web.1    |         sync: false,
15:05:32 web.1    |         needReadable: true,
15:05:32 web.1    |         emittedReadable: false,
15:05:32 web.1    |         readableListening: false,
15:05:32 web.1    |         defaultEncoding: 'utf8',
15:05:32 web.1    |         ranOut: false,
15:05:32 web.1    |         awaitDrain: 0,
15:05:32 web.1    |         readingMore: false,
15:05:32 web.1    |         decoder: null,
15:05:32 web.1    |         encoding: null,
15:05:32 web.1    |         resumeScheduled: false },
15:05:32 web.1    |      readable: false,
15:05:32 web.1    |      domain: null,
15:05:32 web.1    |      _maxListeners: 0,
15:05:32 web.1    |      _writableState: 
15:05:32 web.1    |       WritableState {
15:05:32 web.1    |         objectMode: false,
15:05:32 web.1    |         highWaterMark: 16384,
15:05:32 web.1    |         needDrain: false,
15:05:32 web.1    |         ending: true,
15:05:32 web.1    |         ended: true,
15:05:32 web.1    |         finished: true,
15:05:32 web.1    |         decodeStrings: false,
15:05:32 web.1    |         defaultEncoding: 'utf8',
15:05:32 web.1    |         length: 0,
15:05:32 web.1    |         writing: false,
15:05:32 web.1    |         corked: 0,
15:05:32 web.1    |         sync: false,
15:05:32 web.1    |         bufferProcessing: false,
15:05:32 web.1    |         onwrite: [Function],
15:05:32 web.1    |         writecb: null,
15:05:32 web.1    |         writelen: 0,
15:05:32 web.1    |         bufferedRequest: null,
15:05:32 web.1    |         lastBufferedRequest: null,
15:05:32 web.1    |         pendingcb: 0,
15:05:32 web.1    |         prefinished: true,
15:05:32 web.1    |         errorEmitted: false },
15:05:32 web.1    |      writable: false,
15:05:32 web.1    |      allowHalfOpen: false,
15:05:32 web.1    |      destroyed: true,
15:05:32 web.1    |      bytesRead: 819,
15:05:32 web.1    |      _bytesDispatched: 324,
15:05:32 web.1    |      _sockname: null,
15:05:32 web.1    |      _pendingData: null,
15:05:32 web.1    |      _pendingEncoding: '',
15:05:32 web.1    |      ssl: 
15:05:32 web.1    |       TLSWrap {
15:05:32 web.1    |         _externalStream: {},
15:05:32 web.1    |         fd: -22,
15:05:32 web.1    |         _parent: [Object],
15:05:32 web.1    |         _parentWrap: undefined,
15:05:32 web.1    |         _secureContext: [Object],
15:05:32 web.1    |         reading: true,
15:05:32 web.1    |         owner: [Circular],
15:05:32 web.1    |         onread: [Function: noop],
15:05:32 web.1    |         writeQueueSize: 1,
15:05:32 web.1    |         onhandshakestart: [Function],
15:05:32 web.1    |         onhandshakedone: [Function: bound ],
15:05:32 web.1    |         onocspresponse: [Function: bound onocspresponse],
15:05:32 web.1    |         onerror: [Function] },
15:05:32 web.1    |      server: undefined,
15:05:32 web.1    |      _requestCert: true,
15:05:32 web.1    |      _rejectUnauthorized: true,
15:05:32 web.1    |      parser: null,
15:05:32 web.1    |      _httpMessage: 
15:05:32 web.1    |       ClientRequest {
15:05:32 web.1    |         domain: null,
15:05:32 web.1    |         _events: [Object],
15:05:32 web.1    |         _eventsCount: 5,
15:05:32 web.1    |         _maxListeners: undefined,
15:05:32 web.1    |         output: [],
15:05:32 web.1    |         outputEncodings: [],
15:05:32 web.1    |         outputCallbacks: [],
15:05:32 web.1    |         outputSize: 0,
15:05:32 web.1    |         writable: true,
15:05:32 web.1    |         _last: true,
15:05:32 web.1    |         chunkedEncoding: false,
15:05:32 web.1    |         shouldKeepAlive: false,
15:05:32 web.1    |         useChunkedEncodingByDefault: false,
15:05:32 web.1    |         sendDate: false,
15:05:32 web.1    |         _removedHeader: {},
15:05:32 web.1    |         _contentLength: 0,
15:05:32 web.1    |         _hasBody: true,
15:05:32 web.1    |         _trailer: '',
15:05:32 web.1    |         finished: true,
15:05:32 web.1    |         _headerSent: true,
15:05:32 web.1    |         socket: [Circular],
15:05:32 web.1    |         connection: [Circular],
15:05:32 web.1    |         _header: 'GET /Bing/Search/v1/Web?$format=json&Query=%27facebook%27&$top=50&$skip=0 HTTP/1.1\r\nUser-Agent: Bing Search Client for Node.js\r\nhost: api.datamarket.azure.com\r\nauthorization: Basic N1ZlZFJLTGFFeTc5dGt0K2hYa3VLVm82cFN5bEo5aituQUtTMVQrN3ZKUT06N1ZlZFJLTGFFeTc5dGt0K2hYa3VLVm82cFN5bEo5aituQUtTMVQrN3ZKUT0=\r\nConnection: close\r\n\r\n',
15:05:32 web.1    |         _headers: [Object],
15:05:32 web.1    |         _headerNames: [Object],
15:05:32 web.1    |         _onPendingData: null,
15:05:32 web.1    |         agent: [Object],
15:05:32 web.1    |         socketPath: undefined,
15:05:32 web.1    |         method: 'GET',
15:05:32 web.1    |         path: '/Bing/Search/v1/Web?$format=json&Query=%27facebook%27&$top=50&$skip=0',
15:05:32 web.1    |         timeoutCb: [Function: emitTimeout],
15:05:32 web.1    |         parser: null,
15:05:32 web.1    |         res: [Circular] },
15:05:32 web.1    |      _idleTimeout: -1,
15:05:32 web.1    |      _idleNext: null,
15:05:32 web.1    |      _idlePrev: null,
15:05:32 web.1    |      _idleStart: 5636,
15:05:32 web.1    |      read: [Function],
15:05:32 web.1    |      _consuming: true },
15:05:32 web.1    |   httpVersionMajor: 1,
15:05:32 web.1    |   httpVersionMinor: 1,
15:05:32 web.1    |   httpVersion: '1.1',
15:05:32 web.1    |   complete: true,
15:05:32 web.1    |   headers: 
15:05:32 web.1    |    { 'cache-control': 'private',
15:05:32 web.1    |      'content-type': 'application/atom+xml; charset=utf-8',
15:05:32 web.1    |      server: 'Microsoft-IIS/8.0',
15:05:32 web.1    |      'x-content-type-options': 'nosniff',
15:05:32 web.1    |      activityid: '43a5c94b-c8bd-4d91-bca3-759506a1bc7c',
15:05:32 web.1    |      'x-aspnet-version': '4.0.30319',
15:05:32 web.1    |      'x-powered-by': 'ASP.NET',
15:05:32 web.1    |      'access-control-allow-origin': '*',
15:05:32 web.1    |      'access-control-allow-credentials': 'false',
15:05:32 web.1    |      'access-control-allow-headers': 'Content-Type, Authorization, DataServiceVersion, MaxDataServiceVersion',
15:05:32 web.1    |      'access-control-expose-headers': 'DataServiceVersion, MaxDataServiceVersion',
15:05:32 web.1    |      'access-control-allow-methods': 'GET, POST, PUT, DELETE, OPTIONS',
15:05:32 web.1    |      'access-control-max-age': '604800',
15:05:32 web.1    |      date: 'Mon, 16 Nov 2015 15:05:30 GMT',
15:05:32 web.1    |      connection: 'close',
15:05:32 web.1    |      'content-length': '133' },
15:05:32 web.1    |   rawHeaders: 
15:05:32 web.1    |    [ 'Cache-Control',
15:05:32 web.1    |      'private',
15:05:32 web.1    |      'Content-Type',
15:05:32 web.1    |      'application/atom+xml; charset=utf-8',
15:05:32 web.1    |      'Server',
15:05:32 web.1    |      'Microsoft-IIS/8.0',
15:05:32 web.1    |      'X-Content-Type-Options',
15:05:32 web.1    |      'nosniff',
15:05:32 web.1    |      'ActivityID',
15:05:32 web.1    |      '43a5c94b-c8bd-4d91-bca3-759506a1bc7c',
15:05:32 web.1    |      'X-AspNet-Version',
15:05:32 web.1    |      '4.0.30319',
15:05:32 web.1    |      'X-Powered-By',
15:05:32 web.1    |      'ASP.NET',
15:05:32 web.1    |      'Access-Control-Allow-Origin',
15:05:32 web.1    |      '*',
15:05:32 web.1    |      'Access-Control-Allow-Credentials',
15:05:32 web.1    |      'false',
15:05:32 web.1    |      'Access-Control-Allow-Headers',
15:05:32 web.1    |      'Content-Type, Authorization, DataServiceVersion, MaxDataServiceVersion',
15:05:32 web.1    |      'Access-Control-Expose-Headers',
15:05:32 web.1    |      'DataServiceVersion, MaxDataServiceVersion',
15:05:32 web.1    |      'Access-Control-Allow-Methods',
15:05:32 web.1    |      'GET, POST, PUT, DELETE, OPTIONS',
15:05:32 web.1    |      'Access-Control-Max-Age',
15:05:32 web.1    |      '604800',
15:05:32 web.1    |      'Date',
15:05:32 web.1    |      'Mon, 16 Nov 2015 15:05:30 GMT',
15:05:32 web.1    |      'Connection',
15:05:32 web.1    |      'close',
15:05:32 web.1    |      'Content-Length',
15:05:32 web.1    |      '133' ],
15:05:32 web.1    |   trailers: {},
15:05:32 web.1    |   rawTrailers: [],
15:05:32 web.1    |   upgrade: false,
15:05:32 web.1    |   url: '',
15:05:32 web.1    |   method: null,
15:05:32 web.1    |   statusCode: 502,
15:05:32 web.1    |   statusMessage: 'Bad Gateway',
15:05:32 web.1    |   client: 
15:05:32 web.1    |    TLSSocket {
15:05:32 web.1    |      _tlsOptions: 
15:05:32 web.1    |       { pipe: null,
15:05:32 web.1    |         secureContext: [Object],
15:05:32 web.1    |         isServer: false,
15:05:32 web.1    |         requestCert: true,
15:05:32 web.1    |         rejectUnauthorized: true,
15:05:32 web.1    |         session: undefined,
15:05:32 web.1    |         NPNProtocols: undefined,
15:05:32 web.1    |         requestOCSP: undefined },
15:05:32 web.1    |      _secureEstablished: true,
15:05:32 web.1    |      _securePending: false,
15:05:32 web.1    |      _newSessionPending: false,
15:05:32 web.1    |      _controlReleased: true,
15:05:32 web.1    |      _SNICallback: null,
15:05:32 web.1    |      servername: null,
15:05:32 web.1    |      npnProtocol: undefined,
15:05:32 web.1    |      authorized: true,
15:05:32 web.1    |      authorizationError: null,
15:05:32 web.1    |      encrypted: true,
15:05:32 web.1    |      _events: 
15:05:32 web.1    |       { close: [Object],
15:05:32 web.1    |         end: [Object],
15:05:32 web.1    |         finish: [Function: onSocketFinish],
15:05:32 web.1    |         _socketEnd: [Function: onSocketEnd],
15:05:32 web.1    |         secure: [Function],
15:05:32 web.1    |         free: [Function: onFree],
15:05:32 web.1    |         agentRemove: [Function: onRemove],
15:05:32 web.1    |         drain: [Function: ondrain],
15:05:32 web.1    |         error: [Object],
15:05:32 web.1    |         timeout: [Object] },
15:05:32 web.1    |      _eventsCount: 10,
15:05:32 web.1    |      _connecting: false,
15:05:32 web.1    |      _hadError: false,
15:05:32 web.1    |      _handle: null,
15:05:32 web.1    |      _parent: null,
15:05:32 web.1    |      _host: 'api.datamarket.azure.com',
15:05:32 web.1    |      _readableState: 
15:05:32 web.1    |       ReadableState {
15:05:32 web.1    |         objectMode: false,
15:05:32 web.1    |         highWaterMark: 16384,
15:05:32 web.1    |         buffer: [],
15:05:32 web.1    |         length: 0,
15:05:32 web.1    |         pipes: null,
15:05:32 web.1    |         pipesCount: 0,
15:05:32 web.1    |         flowing: true,
15:05:32 web.1    |         ended: false,
15:05:32 web.1    |         endEmitted: false,
15:05:32 web.1    |         reading: true,
15:05:32 web.1    |         sync: false,
15:05:32 web.1    |         needReadable: true,
15:05:32 web.1    |         emittedReadable: false,
15:05:32 web.1    |         readableListening: false,
15:05:32 web.1    |         defaultEncoding: 'utf8',
15:05:32 web.1    |         ranOut: false,
15:05:32 web.1    |         awaitDrain: 0,
15:05:32 web.1    |         readingMore: false,
15:05:32 web.1    |         decoder: null,
15:05:32 web.1    |         encoding: null,
15:05:32 web.1    |         resumeScheduled: false },
15:05:32 web.1    |      readable: false,
15:05:32 web.1    |      domain: null,
15:05:32 web.1    |      _maxListeners: 0,
15:05:32 web.1    |      _writableState: 
15:05:32 web.1    |       WritableState {
15:05:32 web.1    |         objectMode: false,
15:05:32 web.1    |         highWaterMark: 16384,
15:05:32 web.1    |         needDrain: false,
15:05:32 web.1    |         ending: true,
15:05:32 web.1    |         ended: true,
15:05:32 web.1    |         finished: true,
15:05:32 web.1    |         decodeStrings: false,
15:05:32 web.1    |         defaultEncoding: 'utf8',
15:05:32 web.1    |         length: 0,
15:05:32 web.1    |         writing: false,
15:05:32 web.1    |         corked: 0,
15:05:32 web.1    |         sync: false,
15:05:32 web.1    |         bufferProcessing: false,
15:05:32 web.1    |         onwrite: [Function],
15:05:32 web.1    |         writecb: null,
15:05:32 web.1    |         writelen: 0,
15:05:32 web.1    |         bufferedRequest: null,
15:05:32 web.1    |         lastBufferedRequest: null,
15:05:32 web.1    |         pendingcb: 0,
15:05:32 web.1    |         prefinished: true,
15:05:32 web.1    |         errorEmitted: false },
15:05:32 web.1    |      writable: false,
15:05:32 web.1    |      allowHalfOpen: false,
15:05:32 web.1    |      destroyed: true,
15:05:32 web.1    |      bytesRead: 819,
15:05:32 web.1    |      _bytesDispatched: 324,
15:05:32 web.1    |      _sockname: null,
15:05:32 web.1    |      _pendingData: null,
15:05:32 web.1    |      _pendingEncoding: '',
15:05:32 web.1    |      ssl: 
15:05:32 web.1    |       TLSWrap {
15:05:32 web.1    |         _externalStream: {},
15:05:32 web.1    |         fd: -22,
15:05:32 web.1    |         _parent: [Object],
15:05:32 web.1    |         _parentWrap: undefined,
15:05:32 web.1    |         _secureContext: [Object],
15:05:32 web.1    |         reading: true,
15:05:32 web.1    |         owner: [Circular],
15:05:32 web.1    |         onread: [Function: noop],
15:05:32 web.1    |         writeQueueSize: 1,
15:05:32 web.1    |         onhandshakestart: [Function],
15:05:32 web.1    |         onhandshakedone: [Function: bound ],
15:05:32 web.1    |         onocspresponse: [Function: bound onocspresponse],
15:05:32 web.1    |         onerror: [Function] },
15:05:32 web.1    |      server: undefined,
15:05:32 web.1    |      _requestCert: true,
15:05:32 web.1    |      _rejectUnauthorized: true,
15:05:32 web.1    |      parser: null,
15:05:32 web.1    |      _httpMessage: 
15:05:32 web.1    |       ClientRequest {
15:05:32 web.1    |         domain: null,
15:05:32 web.1    |         _events: [Object],
15:05:32 web.1    |         _eventsCount: 5,
15:05:32 web.1    |         _maxListeners: undefined,
15:05:32 web.1    |         output: [],
15:05:32 web.1    |         outputEncodings: [],
15:05:32 web.1    |         outputCallbacks: [],
15:05:32 web.1    |         outputSize: 0,
15:05:32 web.1    |         writable: true,
15:05:32 web.1    |         _last: true,
15:05:32 web.1    |         chunkedEncoding: false,
15:05:32 web.1    |         shouldKeepAlive: false,
15:05:32 web.1    |         useChunkedEncodingByDefault: false,
15:05:32 web.1    |         sendDate: false,
15:05:32 web.1    |         _removedHeader: {},
15:05:32 web.1    |         _contentLength: 0,
15:05:32 web.1    |         _hasBody: true,
15:05:32 web.1    |         _trailer: '',
15:05:32 web.1    |         finished: true,
15:05:32 web.1    |         _headerSent: true,
15:05:32 web.1    |         socket: [Circular],
15:05:32 web.1    |         connection: [Circular],
15:05:32 web.1    |         _header: 'GET /Bing/Search/v1/Web?$format=json&Query=%27facebook%27&$top=50&$skip=0 HTTP/1.1\r\nUser-Agent: Bing Search Client for Node.js\r\nhost: api.datamarket.azure.com\r\nauthorization: Basic N1ZlZFJLTGFFeTc5dGt0K2hYa3VLVm82cFN5bEo5aituQUtTMVQrN3ZKUT06N1ZlZFJLTGFFeTc5dGt0K2hYa3VLVm82cFN5bEo5aituQUtTMVQrN3ZKUT0=\r\nConnection: close\r\n\r\n',
15:05:32 web.1    |         _headers: [Object],
15:05:32 web.1    |         _headerNames: [Object],
15:05:32 web.1    |         _onPendingData: null,
15:05:32 web.1    |         agent: [Object],
15:05:32 web.1    |         socketPath: undefined,
15:05:32 web.1    |         method: 'GET',
15:05:32 web.1    |         path: '/Bing/Search/v1/Web?$format=json&Query=%27facebook%27&$top=50&$skip=0',
15:05:32 web.1    |         timeoutCb: [Function: emitTimeout],
15:05:32 web.1    |         parser: null,
15:05:32 web.1    |         res: [Circular] },
15:05:32 web.1    |      _idleTimeout: -1,
15:05:32 web.1    |      _idleNext: null,
15:05:32 web.1    |      _idlePrev: null,
15:05:32 web.1    |      _idleStart: 5636,
15:05:32 web.1    |      read: [Function],
15:05:32 web.1    |      _consuming: true },
15:05:32 web.1    |   _consuming: true,
15:05:32 web.1    |   _dumped: false,
15:05:32 web.1    |   req: 
15:05:32 web.1    |    ClientRequest {
15:05:32 web.1    |      domain: null,
15:05:32 web.1    |      _events: 
15:05:32 web.1    |       { socket: [Object],
15:05:32 web.1    |         timeout: [Object],
15:05:32 web.1    |         response: [Function: bound ],
15:05:32 web.1    |         error: [Function: bound ],
15:05:32 web.1    |         drain: [Function] },
15:05:32 web.1    |      _eventsCount: 5,
15:05:32 web.1    |      _maxListeners: undefined,
15:05:32 web.1    |      output: [],
15:05:32 web.1    |      outputEncodings: [],
15:05:32 web.1    |      outputCallbacks: [],
15:05:32 web.1    |      outputSize: 0,
15:05:32 web.1    |      writable: true,
15:05:32 web.1    |      _last: true,
15:05:32 web.1    |      chunkedEncoding: false,
15:05:32 web.1    |      shouldKeepAlive: false,
15:05:32 web.1    |      useChunkedEncodingByDefault: false,
15:05:32 web.1    |      sendDate: false,
15:05:32 web.1    |      _removedHeader: {},
15:05:32 web.1    |      _contentLength: 0,
15:05:32 web.1    |      _hasBody: true,
15:05:32 web.1    |      _trailer: '',
15:05:32 web.1    |      finished: true,
15:05:32 web.1    |      _headerSent: true,
15:05:32 web.1    |      socket: 
15:05:32 web.1    |       TLSSocket {
15:05:32 web.1    |         _tlsOptions: [Object],
15:05:32 web.1    |         _secureEstablished: true,
15:05:32 web.1    |         _securePending: false,
15:05:32 web.1    |         _newSessionPending: false,
15:05:32 web.1    |         _controlReleased: true,
15:05:32 web.1    |         _SNICallback: null,
15:05:32 web.1    |         servername: null,
15:05:32 web.1    |         npnProtocol: undefined,
15:05:32 web.1    |         authorized: true,
15:05:32 web.1    |         authorizationError: null,
15:05:32 web.1    |         encrypted: true,
15:05:32 web.1    |         _events: [Object],
15:05:32 web.1    |         _eventsCount: 10,
15:05:32 web.1    |         _connecting: false,
15:05:32 web.1    |         _hadError: false,
15:05:32 web.1    |         _handle: null,
15:05:32 web.1    |         _parent: null,
15:05:32 web.1    |         _host: 'api.datamarket.azure.com',
15:05:32 web.1    |         _readableState: [Object],
15:05:32 web.1    |         readable: false,
15:05:32 web.1    |         domain: null,
15:05:32 web.1    |         _maxListeners: 0,
15:05:32 web.1    |         _writableState: [Object],
15:05:32 web.1    |         writable: false,
15:05:32 web.1    |         allowHalfOpen: false,
15:05:32 web.1    |         destroyed: true,
15:05:32 web.1    |         bytesRead: 819,
15:05:32 web.1    |         _bytesDispatched: 324,
15:05:32 web.1    |         _sockname: null,
15:05:32 web.1    |         _pendingData: null,
15:05:32 web.1    |         _pendingEncoding: '',
15:05:32 web.1    |         ssl: [Object],
15:05:32 web.1    |         server: undefined,
15:05:32 web.1    |         _requestCert: true,
15:05:32 web.1    |         _rejectUnauthorized: true,
15:05:32 web.1    |         parser: null,
15:05:32 web.1    |         _httpMessage: [Circular],
15:05:32 web.1    |         _idleTimeout: -1,
15:05:32 web.1    |         _idleNext: null,
15:05:32 web.1    |         _idlePrev: null,
15:05:32 web.1    |         _idleStart: 5636,
15:05:32 web.1    |         read: [Function],
15:05:32 web.1    |         _consuming: true },
15:05:32 web.1    |      connection: 
15:05:32 web.1    |       TLSSocket {
15:05:32 web.1    |         _tlsOptions: [Object],
15:05:32 web.1    |         _secureEstablished: true,
15:05:32 web.1    |         _securePending: false,
15:05:32 web.1    |         _newSessionPending: false,
15:05:32 web.1    |         _controlReleased: true,
15:05:32 web.1    |         _SNICallback: null,
15:05:32 web.1    |         servername: null,
15:05:32 web.1    |         npnProtocol: undefined,
15:05:32 web.1    |         authorized: true,
15:05:32 web.1    |         authorizationError: null,
15:05:32 web.1    |         encrypted: true,
15:05:32 web.1    |         _events: [Object],
15:05:32 web.1    |         _eventsCount: 10,
15:05:32 web.1    |         _connecting: false,
15:05:32 web.1    |         _hadError: false,
15:05:32 web.1    |         _handle: null,
15:05:32 web.1    |         _parent: null,
15:05:32 web.1    |         _host: 'api.datamarket.azure.com',
15:05:32 web.1    |         _readableState: [Object],
15:05:32 web.1    |         readable: false,
15:05:32 web.1    |         domain: null,
15:05:32 web.1    |         _maxListeners: 0,
15:05:32 web.1    |         _writableState: [Object],
15:05:32 web.1    |         writable: false,
15:05:32 web.1    |         allowHalfOpen: false,
15:05:32 web.1    |         destroyed: true,
15:05:32 web.1    |         bytesRead: 819,
15:05:32 web.1    |         _bytesDispatched: 324,
15:05:32 web.1    |         _sockname: null,
15:05:32 web.1    |         _pendingData: null,
15:05:32 web.1    |         _pendingEncoding: '',
15:05:32 web.1    |         ssl: [Object],
15:05:32 web.1    |         server: undefined,
15:05:32 web.1    |         _requestCert: true,
15:05:32 web.1    |         _rejectUnauthorized: true,
15:05:32 web.1    |         parser: null,
15:05:32 web.1    |         _httpMessage: [Circular],
15:05:32 web.1    |         _idleTimeout: -1,
15:05:32 web.1    |         _idleNext: null,
15:05:32 web.1    |         _idlePrev: null,
15:05:32 web.1    |         _idleStart: 5636,
15:05:32 web.1    |         read: [Function],
15:05:32 web.1    |         _consuming: true },
15:05:32 web.1    |      _header: 'GET /Bing/Search/v1/Web?$format=json&Query=%27facebook%27&$top=50&$skip=0 HTTP/1.1\r\nUser-Agent: Bing Search Client for Node.js\r\nhost: api.datamarket.azure.com\r\nauthorization: Basic N1ZlZFJLTGFFeTc5dGt0K2hYa3VLVm82cFN5bEo5aituQUtTMVQrN3ZKUT06N1ZlZFJLTGFFeTc5dGt0K2hYa3VLVm82cFN5bEo5aituQUtTMVQrN3ZKUT0=\r\nConnection: close\r\n\r\n',
15:05:32 web.1    |      _headers: 
15:05:32 web.1    |       { 'user-agent': 'Bing Search Client for Node.js',
15:05:32 web.1    |         host: 'api.datamarket.azure.com',
15:05:32 web.1    |         authorization: 'Basic N1ZlZFJLTGFFeTc5dGt0K2hYa3VLVm82cFN5bEo5aituQUtTMVQrN3ZKUT06N1ZlZFJLTGFFeTc5dGt0K2hYa3VLVm82cFN5bEo5aituQUtTMVQrN3ZKUT0=' },
15:05:32 web.1    |      _headerNames: 
15:05:32 web.1    |       { 'user-agent': 'User-Agent',
15:05:32 web.1    |         host: 'host',
15:05:32 web.1    |         authorization: 'authorization' },
15:05:32 web.1    |      _onPendingData: null,
15:05:32 web.1    |      agent: 
15:05:32 web.1    |       Agent {
15:05:32 web.1    |         domain: null,
15:05:32 web.1    |         _events: [Object],
15:05:32 web.1    |         _eventsCount: 1,
15:05:32 web.1    |         _maxListeners: undefined,
15:05:32 web.1    |         defaultPort: 443,
15:05:32 web.1    |         protocol: 'https:',
15:05:32 web.1    |         options: [Object],
15:05:32 web.1    |         requests: {},
15:05:32 web.1    |         sockets: [Object],
15:05:32 web.1    |         freeSockets: {},
15:05:32 web.1    |         keepAliveMsecs: 1000,
15:05:32 web.1    |         keepAlive: false,
15:05:32 web.1    |         maxSockets: Infinity,
15:05:32 web.1    |         maxFreeSockets: 256,
15:05:32 web.1    |         maxCachedSessions: 100,
15:05:32 web.1    |         _sessionCache: [Object] },
15:05:32 web.1    |      socketPath: undefined,
15:05:32 web.1    |      method: 'GET',
15:05:32 web.1    |      path: '/Bing/Search/v1/Web?$format=json&Query=%27facebook%27&$top=50&$skip=0',
15:05:32 web.1    |      timeoutCb: [Function: emitTimeout],
15:05:32 web.1    |      parser: null,
15:05:32 web.1    |      res: [Circular] },
15:05:32 web.1    |   request: 
15:05:32 web.1    |    Request {
15:05:32 web.1    |      domain: null,
15:05:32 web.1    |      _events: 
15:05:32 web.1    |       { error: [Function: bound ],
15:05:32 web.1    |         complete: [Function: bound ],
15:05:32 web.1    |         pipe: [Function],
15:05:32 web.1    |         end: [Object],
15:05:32 web.1    |         data: [Function] },
15:05:32 web.1    |      _eventsCount: 5,
15:05:32 web.1    |      _maxListeners: undefined,
15:05:32 web.1    |      callback: [Function],
15:05:32 web.1    |      timeout: 5000,
15:05:32 web.1    |      headers: 
15:05:32 web.1    |       { 'User-Agent': 'Bing Search Client for Node.js',
15:05:32 web.1    |         authorization: 'Basic N1ZlZFJLTGFFeTc5dGt0K2hYa3VLVm82cFN5bEo5aituQUtTMVQrN3ZKUT06N1ZlZFJLTGFFeTc5dGt0K2hYa3VLVm82cFN5bEo5aituQUtTMVQrN3ZKUT0=' },
15:05:32 web.1    |      method: 'GET',
15:05:32 web.1    |      uri: 
15:05:32 web.1    |       Url {
15:05:32 web.1    |         protocol: 'https:',
15:05:32 web.1    |         slashes: true,
15:05:32 web.1    |         auth: null,
15:05:32 web.1    |         host: 'api.datamarket.azure.com',
15:05:32 web.1    |         port: 443,
15:05:32 web.1    |         hostname: 'api.datamarket.azure.com',
15:05:32 web.1    |         hash: null,
15:05:32 web.1    |         search: '?$format=json&Query=%27facebook%27&$top=50&$skip=0',
15:05:32 web.1    |         query: '$format=json&Query=%27facebook%27&$top=50&$skip=0',
15:05:32 web.1    |         pathname: '/Bing/Search/v1/Web',
15:05:32 web.1    |         path: '/Bing/Search/v1/Web?$format=json&Query=%27facebook%27&$top=50&$skip=0',
15:05:32 web.1    |         href: 'https://api.datamarket.azure.com/Bing/Search/v1/Web?$format=json&Query=%27facebook%27&$top=50&$skip=0' },
15:05:32 web.1    |      readable: true,
15:05:32 web.1    |      writable: true,
15:05:32 web.1    |      explicitMethod: true,
15:05:32 web.1    |      _qs: 
15:05:32 web.1    |       Querystring {
15:05:32 web.1    |         request: [Circular],
15:05:32 web.1    |         lib: [Object],
15:05:32 web.1    |         useQuerystring: undefined,
15:05:32 web.1    |         parseOptions: {},
15:05:32 web.1    |         stringifyOptions: {} },
15:05:32 web.1    |      _auth: 
15:05:32 web.1    |       Auth {
15:05:32 web.1    |         request: [Circular],
15:05:32 web.1    |         hasAuth: true,
15:05:32 web.1    |         sentAuth: true,
15:05:32 web.1    |         bearerToken: null,
15:05:32 web.1    |         user: '7VedRKLaEy79tkt+hXkuKVo6pSylJ9j+nAKS1T+7vJQ=',
15:05:32 web.1    |         pass: '7VedRKLaEy79tkt+hXkuKVo6pSylJ9j+nAKS1T+7vJQ=' },
15:05:32 web.1    |      _oauth: OAuth { request: [Circular], params: null },
15:05:32 web.1    |      _multipart: 
15:05:32 web.1    |       Multipart {
15:05:32 web.1    |         request: [Circular],
15:05:32 web.1    |         boundary: '02473fb0-a1e7-4505-9721-bd79c4824324',
15:05:32 web.1    |         chunked: false,
15:05:32 web.1    |         body: null },
15:05:32 web.1    |      _redirect: 
15:05:32 web.1    |       Redirect {
15:05:32 web.1    |         request: [Circular],
15:05:32 web.1    |         followRedirect: true,
15:05:32 web.1    |         followRedirects: true,
15:05:32 web.1    |         followAllRedirects: false,
15:05:32 web.1    |         allowRedirect: [Function],
15:05:32 web.1    |         maxRedirects: 10,
15:05:32 web.1    |         redirects: [],
15:05:32 web.1    |         redirectsFollowed: 0,
15:05:32 web.1    |         removeRefererHeader: false },
15:05:32 web.1    |      _tunnel: 
15:05:32 web.1    |       Tunnel {
15:05:32 web.1    |         request: [Circular],
15:05:32 web.1    |         proxyHeaderWhiteList: [Object],
15:05:32 web.1    |         proxyHeaderExclusiveList: [] },
15:05:32 web.1    |      setHeader: [Function],
15:05:32 web.1    |      hasHeader: [Function],
15:05:32 web.1    |      getHeader: [Function],
15:05:32 web.1    |      removeHeader: [Function],
15:05:32 web.1    |      localAddress: undefined,
15:05:32 web.1    |      pool: {},
15:05:32 web.1    |      dests: [],
15:05:32 web.1    |      __isRequestRequest: true,
15:05:32 web.1    |      _callback: [Function],
15:05:32 web.1    |      proxy: null,
15:05:32 web.1    |      tunnel: true,
15:05:32 web.1    |      setHost: true,
15:05:32 web.1    |      originalCookieHeader: undefined,
15:05:32 web.1    |      _disableCookies: true,
15:05:32 web.1    |      _jar: undefined,
15:05:32 web.1    |      port: 443,
15:05:32 web.1    |      host: 'api.datamarket.azure.com',
15:05:32 web.1    |      path: '/Bing/Search/v1/Web?$format=json&Query=%27facebook%27&$top=50&$skip=0',
15:05:32 web.1    |      httpModule: 
15:05:32 web.1    |       { Server: [Object],
15:05:32 web.1    |         createServer: [Function],
15:05:32 web.1    |         globalAgent: [Object],
15:05:32 web.1    |         Agent: [Object],
15:05:32 web.1    |         request: [Function],
15:05:32 web.1    |         get: [Function] },
15:05:32 web.1    |      agentClass: { [Function: Agent] super_: [Object] },
15:05:32 web.1    |      agent: 
15:05:32 web.1    |       Agent {
15:05:32 web.1    |         domain: null,
15:05:32 web.1    |         _events: [Object],
15:05:32 web.1    |         _eventsCount: 1,
15:05:32 web.1    |         _maxListeners: undefined,
15:05:32 web.1    |         defaultPort: 443,
15:05:32 web.1    |         protocol: 'https:',
15:05:32 web.1    |         options: [Object],
15:05:32 web.1    |         requests: {},
15:05:32 web.1    |         sockets: [Object],
15:05:32 web.1    |         freeSockets: {},
15:05:32 web.1    |         keepAliveMsecs: 1000,
15:05:32 web.1    |         keepAlive: false,
15:05:32 web.1    |         maxSockets: Infinity,
15:05:32 web.1    |         maxFreeSockets: 256,
15:05:32 web.1    |         maxCachedSessions: 100,
15:05:32 web.1    |         _sessionCache: [Object] },
15:05:32 web.1    |      _started: true,
15:05:32 web.1    |      href: 'https://api.datamarket.azure.com/Bing/Search/v1/Web?$format=json&Query=%27facebook%27&$top=50&$skip=0',
15:05:32 web.1    |      req: 
15:05:32 web.1    |       ClientRequest {
15:05:32 web.1    |         domain: null,
15:05:32 web.1    |         _events: [Object],
15:05:32 web.1    |         _eventsCount: 5,
15:05:32 web.1    |         _maxListeners: undefined,
15:05:32 web.1    |         output: [],
15:05:32 web.1    |         outputEncodings: [],
15:05:32 web.1    |         outputCallbacks: [],
15:05:32 web.1    |         outputSize: 0,
15:05:32 web.1    |         writable: true,
15:05:32 web.1    |         _last: true,
15:05:32 web.1    |         chunkedEncoding: false,
15:05:32 web.1    |         shouldKeepAlive: false,
15:05:32 web.1    |         useChunkedEncodingByDefault: false,
15:05:32 web.1    |         sendDate: false,
15:05:32 web.1    |         _removedHeader: {},
15:05:32 web.1    |         _contentLength: 0,
15:05:32 web.1    |         _hasBody: true,
15:05:32 web.1    |         _trailer: '',
15:05:32 web.1    |         finished: true,
15:05:32 web.1    |         _headerSent: true,
15:05:32 web.1    |         socket: [Object],
15:05:32 web.1    |         connection: [Object],
15:05:32 web.1    |         _header: 'GET /Bing/Search/v1/Web?$format=json&Query=%27facebook%27&$top=50&$skip=0 HTTP/1.1\r\nUser-Agent: Bing Search Client for Node.js\r\nhost: api.datamarket.azure.com\r\nauthorization: Basic N1ZlZFJLTGFFeTc5dGt0K2hYa3VLVm82cFN5bEo5aituQUtTMVQrN3ZKUT06N1ZlZFJLTGFFeTc5dGt0K2hYa3VLVm82cFN5bEo5aituQUtTMVQrN3ZKUT0=\r\nConnection: close\r\n\r\n',
15:05:32 web.1    |         _headers: [Object],
15:05:32 web.1    |         _headerNames: [Object],
15:05:32 web.1    |         _onPendingData: null,
15:05:32 web.1    |         agent: [Object],
15:05:32 web.1    |         socketPath: undefined,
15:05:32 web.1    |         method: 'GET',
15:05:32 web.1    |         path: '/Bing/Search/v1/Web?$format=json&Query=%27facebook%27&$top=50&$skip=0',
15:05:32 web.1    |         timeoutCb: [Function: emitTimeout],
15:05:32 web.1    |         parser: null,
15:05:32 web.1    |         res: [Circular] },
15:05:32 web.1    |      timeoutTimer: null,
15:05:32 web.1    |      ntick: true,
15:05:32 web.1    |      response: [Circular],
15:05:32 web.1    |      originalHost: 'api.datamarket.azure.com',
15:05:32 web.1    |      originalHostHeaderName: 'host',
15:05:32 web.1    |      responseContent: [Circular],
15:05:32 web.1    |      _destdata: true,
15:05:32 web.1    |      _ended: true,
15:05:32 web.1    |      _callbackCalled: true },
15:05:32 web.1    |   toJSON: [Function: responseToJSON],
15:05:32 web.1    |   caseless: 
15:05:32 web.1    |    Caseless {
15:05:32 web.1    |      dict: 
15:05:32 web.1    |       { 'cache-control': 'private',
15:05:32 web.1    |         'content-type': 'application/atom+xml; charset=utf-8',
15:05:32 web.1    |         server: 'Microsoft-IIS/8.0',
15:05:32 web.1    |         'x-content-type-options': 'nosniff',
15:05:32 web.1    |         activityid: '43a5c94b-c8bd-4d91-bca3-759506a1bc7c',
15:05:32 web.1    |         'x-aspnet-version': '4.0.30319',
15:05:32 web.1    |         'x-powered-by': 'ASP.NET',
15:05:32 web.1    |         'access-control-allow-origin': '*',
15:05:32 web.1    |         'access-control-allow-credentials': 'false',
15:05:32 web.1    |         'access-control-allow-headers': 'Content-Type, Authorization, DataServiceVersion, MaxDataServiceVersion',
15:05:32 web.1    |         'access-control-expose-headers': 'DataServiceVersion, MaxDataServiceVersion',
15:05:32 web.1    |         'access-control-allow-methods': 'GET, POST, PUT, DELETE, OPTIONS',
15:05:32 web.1    |         'access-control-max-age': '604800',
15:05:32 web.1    |         date: 'Mon, 16 Nov 2015 15:05:30 GMT',
15:05:32 web.1    |         connection: 'close',
15:05:32 web.1    |         'content-length': '133' } },
15:05:32 web.1    |   read: [Function],
15:05:32 web.1    |   body: 'The request resulted in a backend time out or backend error. The team is investigating the issue. We are sorry for the inconvenience.' }
martynasb commented 9 years ago

@goferito All mocha tests are failing for me.

goferito commented 9 years ago

Hi,

I've been trying to reproduce that error but it works perfectly fine to me. I have even tried with your access key and searching for facebook (just in case xD), and still works fine. All the tests pass. Btw, tests need you to create the secrets.js from the secrets.js.example file, and to add your access key.

So, if you are using the module properly (what I think you do if it was working before), I guess that the problem is a timeout problem, which could be caused by a connectivity problem between your machine and the bing server. The module is forming the request properly.

Regarding your access key, I'd advise you to change it since you have published it here.

martynasb commented 9 years ago

@goferito thanks for looking into this. Yes, I have created the secrets.js file.

It's very odd: i'm getting the same problem on my heroku app, my localhost app, Microsoft Bing Search Interface and your the node-bing-api module when i run the tests...

martynasb commented 9 years ago

@goferito ok i'm not the only one https://social.msdn.microsoft.com/Forums/azure/en-US/7f2c3522-b012-4c45-9223-f9c551d1af48/bing-search-api-error-502?forum=DataMarket

goferito commented 9 years ago

Ok, then it looks like a MS problem. Maybe it works fine for me because of my geo location, and I'm making the request to a mirror that is working fine. I have run the tests successfully from germany and florida though...

goferito commented 9 years ago

Maybe you can try to proxy from somewhere else until the problem is solved

Yingmin-Li commented 8 years ago

403 - Forbidden: Access is denied. You do not have permission to view this directory or page using the credentials that you supplied.

I got this error with several Bing API wrappers, does MS change their API policy?

goferito commented 8 years ago

My access key works fine.

They changed it when they switched to Azure. Therefore this module.

Yingmin-Li commented 8 years ago

@goferito, my fault, I just did not sign up for the search API. Thank you for the help.