nl_tokens: Creates an instance of the travis - ci HTTP agent with a given endpoint and request options .
pl_tokens: function TravisStatusHttp ( endpoint , options ) { if ( endpoint && typeof endpoint !== 'string' ) { throw new TypeError ( 'endpoint must be a string' ) ; } endpoint = endpoint && trimSlash ( endpoint ) ; if ( options && typeof options !== 'object' ) { throw new TypeError ( 'options must be an object' ) ; } options = Object . assign ( { gzip : true } , options ) ; options . headers = Object . assign ( { } , options . headers ) ; // Careful about providing default values for case-insensitive headers const caselessHeaders = caseless ( options . headers ) ; // The Travis CI API docs say // "Always set the Accept header to application/vnd.travis-ci.2+json" // but the API actually sends Content-Type application/json. // Declare that we accept either. if ( ! caselessHeaders . has ( 'Accept' ) ) { options . <mask> . Accept = 'application/vnd.travis-ci.2+json, application/json' ; } if ( ! caselessHeaders . has ( 'User-Agent' ) ) { options . headers [ 'User-Agent' ] = DEFAULT_USER_AGENT ; } TravisHttp . call ( this , endpoint === constants . PRO_URI , options . headers ) ; this . _endpoint = endpoint || constants . ORG_URI ; // Set this._headers as TravisHttp does this . _headers = options . headers ; delete options . headers ; this . _options = options ; }