Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface HTTP

instance

Hierarchy

  • HTTP

Implemented by

Index

Methods

closeSession

  • closeSession(): void

downloadFileByGet

  • downloadFileByGet(urlPath: string, destpath: string, callback?: ProgressCallback): Promise<string>
  • Download a file

    Parameters

    • urlPath: string

      file url

    • destpath: string

      path to save file

    • Optional callback: ProgressCallback

      callback to view download progress

    Returns Promise<string>

downloadFileByPost

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

    Parameters

    • urlPath: string

      file url

    • postValues: Record<string, string>
    • basepath: string

      path to save file

    • Optional callback: ProgressCallback

      callback to view download progress

    Returns Promise<string>

followAllRedirect

get

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.

    • Optional options: SigaaRequestOptions

    Returns Promise<Page>

postMultipart

Generated using TypeDoc