Options
All
  • Public
  • Public/Protected
  • All
Menu

Module common/lib/helper

Functions

addAdditionalHeaders

  • addAdditionalHeaders(headers: Headers, params: RequestParams): void

autoDetectContentLengthAndReadBody

  • autoDetectContentLengthAndReadBody(headers: Headers, params: RequestParams): Promise<any>

byteLength

  • byteLength(input: any): any

calculateContentLengthAndBodyContent

convertStringToType

  • convertStringToType(str: string | null, expectedType: string): any

formatDateToRFC3339

  • formatDateToRFC3339(date: Date): string

getSignerAndReqBody

  • getSignerAndReqBody(body?: any, forceExcludeBody?: undefined | false | true): object
  • Parameters

    • Optional body: any
    • Optional forceExcludeBody: undefined | false | true

    Returns object

    • requestBody: any
    • signerBody: any

getStringFromRequestBody

  • getStringFromRequestBody(body: any): Promise<string>

getStringFromResponseBody

  • getStringFromResponseBody(body: any): Promise<string>

handleErrorBody

  • handleErrorBody(response: Response): Promise<string | object>

handleErrorResponse

  • handleErrorResponse(response: Response, body: any): OciError

isReadableStream

  • isReadableStream(body: any): Boolean

mapContainer

  • mapContainer(obj: object, getJsonObj: Function): object

readStringFromReadable

  • readStringFromReadable(readable: Readable): Promise<string>