Options
All
  • Public
  • Public/Protected
  • All
Menu

Class HttpTransfer

Base class that defines methods for transferring content over HTTP.

Hierarchy

  • HttpTransfer

Index

Constructors

constructor

  • Returns HttpTransfer

Properties

Static Private __fmicelinkHttpTransferInitialized

__fmicelinkHttpTransferInitialized: boolean = false
internal

Static Private fm_icelink_HttpTransfer___onSendFinish

fm_icelink_HttpTransfer___onSendFinish: Array<IAction1<HttpSendFinishArgs>>
internal

Static Private fm_icelink_HttpTransfer___onSendStart

fm_icelink_HttpTransfer___onSendStart: Array<IAction1<HttpSendStartArgs>>
internal

Static Private fm_icelink_HttpTransfer___wildcardCharacters

fm_icelink_HttpTransfer___wildcardCharacters: string
internal

Static Private fm_icelink_HttpTransfer__onSendFinish

fm_icelink_HttpTransfer__onSendFinish: IAction1<HttpSendFinishArgs>
internal

Static Private fm_icelink_HttpTransfer__onSendStart

fm_icelink_HttpTransfer__onSendStart: IAction1<HttpSendStartArgs>
internal

Methods

Private finishRequest

  • finishRequest(responseArgs: HttpResponseArgs): void
  • internal

    Parameters

    • responseArgs: HttpResponseArgs

    Returns void

getTypeString

  • getTypeString(): string
  • Returns string

Private raiseOnSendFinish

  • raiseOnSendFinish(responseArgs: HttpResponseArgs): void
  • internal

    Parameters

    • responseArgs: HttpResponseArgs

    Returns void

Private raiseOnSendStart

  • raiseOnSendStart(requestArgs: HttpRequestArgs): void
  • internal

    Parameters

    • requestArgs: HttpRequestArgs

    Returns void

send

  • send(requestArgs: HttpRequestArgs): HttpResponseArgs
  • Sends a request synchronously.

    Parameters

    • requestArgs: HttpRequestArgs

      The request parameters.

    Returns HttpResponseArgs

    The resulting response.

sendAsync

  • sendAsync(requestArgs: HttpRequestArgs, callback: IAction1<HttpResponseArgs>): void
  • Sends a request asynchronously.

    Parameters

    • requestArgs: HttpRequestArgs

      The request parameters.

    • callback: IAction1<HttpResponseArgs>

      The callback to execute with the resulting response.

    Returns void

Abstract sendBinary

  • sendBinary(requestArgs: HttpRequestArgs): HttpResponseArgs
  • Sends binary content synchronously using the specified arguments.

    Parameters

    • requestArgs: HttpRequestArgs

      The request arguments.

    Returns HttpResponseArgs

    The response arguments from the server.

Abstract sendBinaryAsync

  • sendBinaryAsync(requestArgs: HttpRequestArgs, callback: IAction1<HttpResponseArgs>): void
  • Sends binary content asynchronously using the specified arguments.

    Parameters

    • requestArgs: HttpRequestArgs

      The request arguments.

    • callback: IAction1<HttpResponseArgs>

      The callback to execute on success or failure.

    Returns void

Abstract sendText

  • sendText(requestArgs: HttpRequestArgs): HttpResponseArgs
  • Sends text content synchronously using the specified arguments.

    Parameters

    • requestArgs: HttpRequestArgs

      The request arguments.

    Returns HttpResponseArgs

    The response arguments from the server.

Abstract sendTextAsync

  • sendTextAsync(requestArgs: HttpRequestArgs, callback: IAction1<HttpResponseArgs>): void
  • Sends text content asynchronously using the specified arguments.

    Parameters

    • requestArgs: HttpRequestArgs

      The request arguments.

    • callback: IAction1<HttpResponseArgs>

      The callback to execute on success or failure.

    Returns void

Abstract shutdown

  • shutdown(): void
  • Releases any resources and shuts down.

    Returns void

Private startRequest

  • startRequest(requestArgs: HttpRequestArgs): void
  • internal

    Parameters

    • requestArgs: HttpRequestArgs

    Returns void

Static addOnSendFinish

  • addOnSendFinish(value: IAction1<HttpSendFinishArgs>): void
  • Adds a handler that is raised before an HTTP request is sent.

    Parameters

    • value: IAction1<HttpSendFinishArgs>

    Returns void

Static addOnSendStart

  • addOnSendStart(value: IAction1<HttpSendStartArgs>): void
  • Adds a handler that is raised before an HTTP request is sent.

    Parameters

    • value: IAction1<HttpSendStartArgs>

    Returns void

Static addQueryToUrl

  • addQueryToUrl(url: string, key: string, value: string): string
  • addQueryToUrl(url: string, key: string): string
  • Escapes and adds a query parameter as a key/value pair to a URL.

    Parameters

    • url: string

      The URL with the query to which the key/value should be added.

    • key: string

      The key of the query parameter to add.

    • value: string

      The value of the query parameter to add.

    Returns string

    The original URL with the query parameter added.

  • Escapes and adds a query parameter as a key/empty-value pair to a URL.

    Parameters

    • url: string

      The URL with the query to which the key/value should be added.

    • key: string

      The key of the query parameter to add.

    Returns string

    The original URL with the query parameter added.

Static fmicelinkHttpTransferInitialize

  • fmicelinkHttpTransferInitialize(): void
  • internal

    Returns void

Static getRandomWildcardCharacter

  • getRandomWildcardCharacter(): string
  • Gets a random wildcard character.

    Returns string

    A random wildcard character.

Static getWildcardCharacters

  • getWildcardCharacters(): string
  • Gets the wildcard characters used to replace asterisks in ReplaceWildcards.

    Returns string

Static removeOnSendFinish

  • removeOnSendFinish(value: IAction1<HttpSendFinishArgs>): void
  • Removes a handler that is raised before an HTTP request is sent.

    Parameters

    • value: IAction1<HttpSendFinishArgs>

    Returns void

Static removeOnSendStart

  • removeOnSendStart(value: IAction1<HttpSendStartArgs>): void
  • Removes a handler that is raised before an HTTP request is sent.

    Parameters

    • value: IAction1<HttpSendStartArgs>

    Returns void

Static replaceWildcards

  • replaceWildcards(url: string): string
  • Replaces asterisks in URLs with characters from WildcardCharacters.

    Parameters

    • url: string

      The URL with asterisks.

    Returns string

Static setWildcardCharacters

  • setWildcardCharacters(value: string): void
  • Sets the wildcard characters used to replace asterisks in ReplaceWildcards.

    Parameters

    • value: string

    Returns void