/ fm / liveswitch / HttpTransfer
Class: HttpTransfer
fm.liveswitch.HttpTransfer
Base class that defines methods for transferring content over HTTP.
Hierarchy
HttpTransfer
Table of contents
Constructors
Methods
- getTypeString
- send
- sendAsync
- sendBinary
- sendBinaryAsync
- sendText
- sendTextAsync
- shutdown
- addOnSendFinish
- addOnSendStart
- addQueryToUrl
- getRandomWildcardCharacter
- getWildcardCharacters
- removeOnSendFinish
- removeOnSendStart
- replaceWildcards
- setWildcardCharacters
Constructors
constructor
+ new HttpTransfer(): HttpTransfer
Returns: HttpTransfer
Defined in: Generated/TypeScript/fm.liveswitch/HttpTransfer.ts:23
Methods
getTypeString
▸ getTypeString(): string
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/HttpTransfer.ts:9
send
▸ send(requestArgs
: HttpRequestArgs): HttpResponseArgs
Sends a request synchronously.
Parameters:
Name | Type | Description |
---|---|---|
requestArgs |
HttpRequestArgs | The request parameters. |
Returns: HttpResponseArgs
The resulting response.
Defined in: Generated/TypeScript/fm.liveswitch/HttpTransfer.ts:296
sendAsync
▸ sendAsync(requestArgs
: HttpRequestArgs, callback
: IAction1<HttpResponseArgs>): void
Sends a request asynchronously.
Parameters:
Name | Type | Description |
---|---|---|
requestArgs |
HttpRequestArgs | The request parameters. |
callback |
IAction1<HttpResponseArgs> | The callback to execute with the resulting response. |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/HttpTransfer.ts:323
sendBinary
▸ Abstract
sendBinary(requestArgs
: HttpRequestArgs): HttpResponseArgs
Sends binary content synchronously using the specified arguments.
Parameters:
Name | Type | Description |
---|---|---|
requestArgs |
HttpRequestArgs | The request arguments. |
Returns: HttpResponseArgs
The response arguments from the server.
Defined in: Generated/TypeScript/fm.liveswitch/HttpTransfer.ts:359
sendBinaryAsync
▸ Abstract
sendBinaryAsync(requestArgs
: HttpRequestArgs, callback
: IAction1<HttpResponseArgs>): void
Sends binary content asynchronously using the specified arguments.
Parameters:
Name | Type | Description |
---|---|---|
requestArgs |
HttpRequestArgs | The request arguments. |
callback |
IAction1<HttpResponseArgs> | The callback to execute on success or failure. |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/HttpTransfer.ts:367
sendText
▸ Abstract
sendText(requestArgs
: HttpRequestArgs): HttpResponseArgs
Sends text content synchronously using the specified arguments.
Parameters:
Name | Type | Description |
---|---|---|
requestArgs |
HttpRequestArgs | The request arguments. |
Returns: HttpResponseArgs
The response arguments from the server.
Defined in: Generated/TypeScript/fm.liveswitch/HttpTransfer.ts:375
sendTextAsync
▸ Abstract
sendTextAsync(requestArgs
: HttpRequestArgs, callback
: IAction1<HttpResponseArgs>): void
Sends text content asynchronously using the specified arguments.
Parameters:
Name | Type | Description |
---|---|---|
requestArgs |
HttpRequestArgs | The request arguments. |
callback |
IAction1<HttpResponseArgs> | The callback to execute on success or failure. |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/HttpTransfer.ts:383
shutdown
▸ Abstract
shutdown(): void
Releases any resources and shuts down.
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/HttpTransfer.ts:389
addOnSendFinish
▸ Static
addOnSendFinish(value
: IAction1<HttpSendFinishArgs>): void
Adds a handler that is raised before an HTTP request is sent.
Parameters:
Name | Type |
---|---|
value |
IAction1<HttpSendFinishArgs> |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/HttpTransfer.ts:42
addOnSendStart
▸ Static
addOnSendStart(value
: IAction1<HttpSendStartArgs>): void
Adds a handler that is raised before an HTTP request is sent.
Parameters:
Name | Type |
---|---|
value |
IAction1<HttpSendStartArgs> |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/HttpTransfer.ts:55
addQueryToUrl
▸ Static
addQueryToUrl(url
: string, key
: string): string
Escapes and adds a query parameter as a key/empty-value pair to a URL.
Parameters:
Name | Type | Description |
---|---|---|
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.
Defined in: Generated/TypeScript/fm.liveswitch/HttpTransfer.ts:71
▸ Static
addQueryToUrl(url
: string, key
: string, value
: string): string
Escapes and adds a query parameter as a key/value pair to a URL.
Parameters:
Name | Type | Description |
---|---|---|
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.
Defined in: Generated/TypeScript/fm.liveswitch/HttpTransfer.ts:81
getRandomWildcardCharacter
▸ Static
getRandomWildcardCharacter(): string
Gets a random wildcard character.
Returns: string
A random wildcard character.
Defined in: Generated/TypeScript/fm.liveswitch/HttpTransfer.ts:111
getWildcardCharacters
▸ Static
getWildcardCharacters(): string
Gets the wildcard characters used to replace asterisks in ReplaceWildcards.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/HttpTransfer.ts:127
removeOnSendFinish
▸ Static
removeOnSendFinish(value
: IAction1<HttpSendFinishArgs>): void
Removes a handler that is raised before an HTTP request is sent.
Parameters:
Name | Type |
---|---|
value |
IAction1<HttpSendFinishArgs> |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/HttpTransfer.ts:140
removeOnSendStart
▸ Static
removeOnSendStart(value
: IAction1<HttpSendStartArgs>): void
Removes a handler that is raised before an HTTP request is sent.
Parameters:
Name | Type |
---|---|
value |
IAction1<HttpSendStartArgs> |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/HttpTransfer.ts:153
replaceWildcards
▸ Static
replaceWildcards(url
: string): string
Replaces asterisks in URLs with characters from WildcardCharacters.
Parameters:
Name | Type | Description |
---|---|---|
url |
string | The URL with asterisks. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/HttpTransfer.ts:168
setWildcardCharacters
▸ Static
setWildcardCharacters(value
: string): void
Sets the wildcard characters used to replace asterisks in ReplaceWildcards.
Parameters:
Name | Type |
---|---|
value |
string |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/HttpTransfer.ts:182