Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SigaaHTTP

HTTP request class

param

A instance of SigaaSession

Hierarchy

  • SigaaHTTP

Implements

Index

Constructors

constructor

Methods

closeSession

  • closeSession(): void

Private convertReadebleToBuffer

  • convertReadebleToBuffer(stream: ReadableStream): Promise<Buffer>
  • Convert stream.Readable to buffer

    Parameters

    • stream: ReadableStream

      readable stream

    Returns Promise<Buffer>

Private downloadFile

downloadFileByGet

  • downloadFileByGet(urlPath: string, basepath: string, callback?: ProgressCallback): Promise<string>

downloadFileByPost

  • downloadFileByPost(urlPath: string, postValues: Record<string, string>, basepath: string, callback?: ProgressCallback): Promise<string>

Private encodePostValue

Private encodeWithRFC3986

  • encodeWithRFC3986(str: string): string
  • RFC 3986 Uses the UTF-8 code point to code, not the hexadecimal binary

    Parameters

    • str: string

    Returns string

followAllRedirect

get

Private getRequestBasicOptions

Protected parserResponse

  • parserResponse(response: IncomingMessage): Promise<HTTPResponse>

post

  • Make a POST request

    Parameters

    • path: string

      The path of request or full URL

    • postValues: Record<string, string>

      Post values in format, key as field name, and value as field value.

    • options: SigaaRequestOptions = {}

    Returns Promise<Page>

postMultipart

Protected requestHTTP

Private requestPage

Generated using TypeDoc