Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface BitGoRequest

Hierarchy

  • Request
    • BitGoRequest

Index

Properties

Promise

Promise: PromiseConstructor

[Symbol.toStringTag]

[Symbol.toStringTag]: string

Optional authenticationToken

authenticationToken: undefined | string

end

end: function

Type declaration

    • (callback?: NodeCallback<superagent.Response>): Bluebird<superagent.Response>
    • Parameters

      Returns Bluebird<superagent.Response>

forceV1Auth

forceV1Auth: boolean

Optional isV2Authenticated

isV2Authenticated: undefined | false | true

proxy

proxy: function

Type declaration

    • (proxyUrl: string): this
    • Parameters

      • proxyUrl: string

      Returns this

result

result: function

Type declaration

    • (optionalField?: undefined | string): Bluebird<any>
    • Parameters

      • Optional optionalField: undefined | string

      Returns Bluebird<any>

verifyResponse

verifyResponse: function

Type declaration

    • (response: superagent.Response): superagent.Response
    • Parameters

      • response: superagent.Response

      Returns superagent.Response

Methods

abort

  • abort(): void
  • Returns void

accept

  • accept(type: string): this
  • Parameters

    • type: string

    Returns this

attach

  • attach(field: string, file: MultipartValueSingle, options?: string | object): this
  • Parameters

    • field: string
    • file: MultipartValueSingle
    • Optional options: string | object

    Returns this

auth

  • auth(user: string, pass: string, options?: undefined | object): this
  • auth(token: string, options: object): this
  • Parameters

    • user: string
    • pass: string
    • Optional options: undefined | object

    Returns this

  • Parameters

    • token: string
    • options: object

    Returns this

buffer

  • buffer(val?: undefined | false | true): this
  • Parameters

    • Optional val: undefined | false | true

    Returns this

ca

  • ca(cert: string | string[] | Buffer | Buffer[]): this
  • Parameters

    • cert: string | string[] | Buffer | Buffer[]

    Returns this

catch

  • catch<TResult>(onrejected?: function | undefined | null): Promise<Response | TResult>
  • Attaches a callback for only the rejection of the Promise.

    Type parameters

    • TResult

    Parameters

    • Optional onrejected: function | undefined | null

      The callback to execute when the Promise is rejected.

    Returns Promise<Response | TResult>

    A Promise for the completion of the callback.

cert

  • cert(cert: string | string[] | Buffer | Buffer[]): this
  • Parameters

    • cert: string | string[] | Buffer | Buffer[]

    Returns this

clearTimeout

  • clearTimeout(): this
  • Returns this

disableTLSCerts

  • disableTLSCerts(): this
  • Returns this

field

  • field(name: string, val: MultipartValue): this
  • field(fields: object): this
  • Parameters

    • name: string
    • val: MultipartValue

    Returns this

  • Parameters

    • fields: object
      • [fieldName: string]: MultipartValue

    Returns this

finally

  • finally(onfinally?: function | undefined | null): Promise<Response>
  • Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The resolved value cannot be modified from the callback.

    Parameters

    • Optional onfinally: function | undefined | null

      The callback to execute when the Promise is settled (fulfilled or rejected).

    Returns Promise<Response>

    A Promise for the completion of the callback.

get

  • get(field: string): string
  • Parameters

    • field: string

    Returns string

key

  • key(cert: string | string[] | Buffer | Buffer[]): this
  • Parameters

    • cert: string | string[] | Buffer | Buffer[]

    Returns this

maxResponseSize

  • maxResponseSize(size: number): this
  • Parameters

    • size: number

    Returns this

ok

  • ok(callback: function): this
  • Parameters

    • callback: function
        • (res: Response): boolean
        • Parameters

          • res: Response

          Returns boolean

    Returns this

on

  • on(name: "error", handler: function): this
  • on(name: "progress", handler: function): this
  • on(name: "response", handler: function): this
  • on(name: string, handler: function): this
  • Parameters

    • name: "error"
    • handler: function
        • (err: any): void
        • Parameters

          • err: any

          Returns void

    Returns this

  • Parameters

    • name: "progress"
    • handler: function
        • (event: ProgressEvent): void
        • Parameters

          • event: ProgressEvent

          Returns void

    Returns this

  • Parameters

    • name: "response"
    • handler: function
        • (response: Response): void
        • Parameters

          • response: Response

          Returns void

    Returns this

  • Parameters

    • name: string
    • handler: function
        • (event: any): void
        • Parameters

          • event: any

          Returns void

    Returns this

parse

  • parse(parser: Parser): this
  • Parameters

    • parser: Parser

    Returns this

part

  • part(): this
  • Returns this

pfx

  • pfx(cert: string | string[] | Buffer | Buffer[] | object): this
  • Parameters

    • cert: string | string[] | Buffer | Buffer[] | object

    Returns this

pipe

  • pipe(stream: WritableStream, options?: undefined | object): stream.Writable
  • Parameters

    • stream: WritableStream
    • Optional options: undefined | object

    Returns stream.Writable

query

  • query(val: object | string): this
  • Parameters

    • val: object | string

    Returns this

redirects

  • redirects(n: number): this
  • Parameters

    • n: number

    Returns this

responseType

  • responseType(type: string): this
  • Parameters

    • type: string

    Returns this

retry

  • retry(count?: undefined | number, callback?: CallbackHandler): this
  • Parameters

    • Optional count: undefined | number
    • Optional callback: CallbackHandler

    Returns this

send

  • send(data?: string | object): this
  • Parameters

    • Optional data: string | object

    Returns this

serialize

  • serialize(serializer: Serializer): this
  • Parameters

    • serializer: Serializer

    Returns this

set

  • set(field: object): this
  • set(field: string, val: string): this
  • set(field: "Cookie", val: string[]): this
  • Parameters

    • field: object

    Returns this

  • Parameters

    • field: string
    • val: string

    Returns this

  • Parameters

    • field: "Cookie"
    • val: string[]

    Returns this

then

  • then<TResult1, TResult2>(onfulfilled?: function | undefined | null, onrejected?: function | undefined | null): Promise<TResult1 | TResult2>
  • Attaches callbacks for the resolution and/or rejection of the Promise.

    Type parameters

    • TResult1

    • TResult2

    Parameters

    • Optional onfulfilled: function | undefined | null

      The callback to execute when the Promise is resolved.

    • Optional onrejected: function | undefined | null

      The callback to execute when the Promise is rejected.

    Returns Promise<TResult1 | TResult2>

    A Promise for the completion of which ever callback is executed.

timeout

  • timeout(ms: number | object): this
  • Parameters

    • ms: number | object

    Returns this

trustLocalhost

  • trustLocalhost(enabled?: undefined | false | true): this
  • Parameters

    • Optional enabled: undefined | false | true

    Returns this

type

  • type(val: string): this
  • Parameters

    • val: string

    Returns this

unset

  • unset(field: string): this
  • Parameters

    • field: string

    Returns this

use

  • use(fn: Plugin): this
  • Parameters

    • fn: Plugin

    Returns this

withCredentials

  • withCredentials(): this
  • Returns this

write

  • write(data: string | Buffer, encoding?: undefined | string): this
  • Parameters

    • data: string | Buffer
    • Optional encoding: undefined | string

    Returns this

Generated using TypeDoc