FMLiveSwitchHttpTransfer Class Reference

Base class that defines methods for transferring content over HTTP. More...

Instance Methods

(instancetype) - init
 
(void) - sendAsyncWithRequestArgs:callback:
 Sends a request asynchronously. More...
 
(void) - sendAsyncWithRequestArgs:callbackBlock:
 Sends a request asynchronously. More...
 
(FMLiveSwitchHttpResponseArgs *) - sendAsyncWithRequestArgsAndCallbackBlock
 Sends a request asynchronously. More...
 
(void) - sendBinaryAsyncWithRequestArgs:callback:
 Sends binary content asynchronously using the specified arguments. More...
 
(void) - sendBinaryAsyncWithRequestArgs:callbackBlock:
 Sends binary content asynchronously using the specified arguments. More...
 
(FMLiveSwitchHttpResponseArgs *) - sendBinaryAsyncWithRequestArgsAndCallbackBlock
 Sends binary content asynchronously using the specified arguments. More...
 
(FMLiveSwitchHttpResponseArgs *) - sendBinaryWithRequestArgs:
 Sends binary content synchronously using the specified arguments. More...
 
(void) - sendTextAsyncWithRequestArgs:callback:
 Sends text content asynchronously using the specified arguments. More...
 
(void) - sendTextAsyncWithRequestArgs:callbackBlock:
 Sends text content asynchronously using the specified arguments. More...
 
(FMLiveSwitchHttpResponseArgs *) - sendTextAsyncWithRequestArgsAndCallbackBlock
 Sends text content asynchronously using the specified arguments. More...
 
(FMLiveSwitchHttpResponseArgs *) - sendTextWithRequestArgs:
 Sends text content synchronously using the specified arguments. More...
 
(FMLiveSwitchHttpResponseArgs *) - sendWithRequestArgs:
 Sends a request synchronously. More...
 
(void) - shutdown
 Releases any resources and shuts down. More...
 

Class Methods

(void) + addOnSendFinish:
 Adds a handler that is raised before an HTTP request is sent. More...
 
(FMLiveSwitchHttpSendFinishArgs *) + addOnSendFinishWithBlock
 Adds a handler that is raised before an HTTP request is sent. More...
 
(void) + addOnSendFinishWithBlock:
 Adds a handler that is raised before an HTTP request is sent. More...
 
(void) + addOnSendStart:
 Adds a handler that is raised before an HTTP request is sent. More...
 
(FMLiveSwitchHttpSendStartArgs *) + addOnSendStartWithBlock
 Adds a handler that is raised before an HTTP request is sent. More...
 
(void) + addOnSendStartWithBlock:
 Adds a handler that is raised before an HTTP request is sent. More...
 
(NSString *) + addQueryToUrl:key:
 Escapes and adds a query parameter as a key/empty-value pair to a URL. More...
 
(NSString *) + addQueryToUrl:key:value:
 Escapes and adds a query parameter as a key/value pair to a URL. More...
 
(NSString *) + getRandomWildcardCharacter
 Gets a random wildcard character. More...
 
(FMLiveSwitchHttpTransfer *) + httpTransfer
 
(void) + removeOnSendFinish:
 Removes a handler that is raised before an HTTP request is sent. More...
 
(void) + removeOnSendStart:
 Removes a handler that is raised before an HTTP request is sent. More...
 
(NSString *) + replaceWildcardsWithUrl:
 Replaces asterisks in URLs with characters from WildcardCharacters. More...
 
(void) + setWildcardCharacters:
 Sets the wildcard characters used to replace asterisks in ReplaceWildcards. More...
 
(NSString *) + wildcardCharacters
 Gets the wildcard characters used to replace asterisks in ReplaceWildcards. More...
 

Detailed Description

Base class that defines methods for transferring content over HTTP.

Method Documentation

◆ addOnSendFinish:

+ (void) addOnSendFinish: (FMLiveSwitchAction1< FMLiveSwitchHttpSendFinishArgs * > *)  value

Adds a handler that is raised before an HTTP request is sent.

◆ addOnSendFinishWithBlock

+ (FMLiveSwitchHttpSendFinishArgs*) addOnSendFinishWithBlock

Adds a handler that is raised before an HTTP request is sent.

◆ addOnSendFinishWithBlock:

+ (void) addOnSendFinishWithBlock: (void(^)(FMLiveSwitchHttpSendFinishArgs *))  valueBlock

Adds a handler that is raised before an HTTP request is sent.

◆ addOnSendStart:

+ (void) addOnSendStart: (FMLiveSwitchAction1< FMLiveSwitchHttpSendStartArgs * > *)  value

Adds a handler that is raised before an HTTP request is sent.

◆ addOnSendStartWithBlock

+ (FMLiveSwitchHttpSendStartArgs*) addOnSendStartWithBlock

Adds a handler that is raised before an HTTP request is sent.

◆ addOnSendStartWithBlock:

+ (void) addOnSendStartWithBlock: (void(^)(FMLiveSwitchHttpSendStartArgs *))  valueBlock

Adds a handler that is raised before an HTTP request is sent.

◆ addQueryToUrl:key:

+ (NSString*) addQueryToUrl: (NSString *)  url
key: (NSString *)  key 

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

Parameters
urlThe URL with the query to which the key/value should be added.
keyThe key of the query parameter to add.
Returns
The original URL with the query parameter added.

◆ addQueryToUrl:key:value:

+ (NSString*) addQueryToUrl: (NSString *)  url
key: (NSString *)  key
value: (NSString *)  value 

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

Parameters
urlThe URL with the query to which the key/value should be added.
keyThe key of the query parameter to add.
valueThe value of the query parameter to add.
Returns
The original URL with the query parameter added.

◆ getRandomWildcardCharacter

+ (NSString*) getRandomWildcardCharacter

Gets a random wildcard character.

Returns
A random wildcard character.

◆ httpTransfer

+ (FMLiveSwitchHttpTransfer*) httpTransfer

◆ init

- (instancetype) init

◆ removeOnSendFinish:

+ (void) removeOnSendFinish: (FMLiveSwitchAction1< FMLiveSwitchHttpSendFinishArgs * > *)  value

Removes a handler that is raised before an HTTP request is sent.

◆ removeOnSendStart:

+ (void) removeOnSendStart: (FMLiveSwitchAction1< FMLiveSwitchHttpSendStartArgs * > *)  value

Removes a handler that is raised before an HTTP request is sent.

◆ replaceWildcardsWithUrl:

+ (NSString*) replaceWildcardsWithUrl: (NSString *)  url

Replaces asterisks in URLs with characters from WildcardCharacters.

Parameters
urlThe URL with asterisks.

◆ sendAsyncWithRequestArgs:callback:

- (void) sendAsyncWithRequestArgs: (FMLiveSwitchHttpRequestArgs *)  requestArgs
callback: (FMLiveSwitchAction1< FMLiveSwitchHttpResponseArgs * > *)  callback 

Sends a request asynchronously.

Parameters
requestArgsThe request parameters.
callbackThe callback to execute with the resulting response.

◆ sendAsyncWithRequestArgs:callbackBlock:

- (void) sendAsyncWithRequestArgs: (FMLiveSwitchHttpRequestArgs *)  requestArgs
callbackBlock: (void(^)(FMLiveSwitchHttpResponseArgs *))  callbackBlock 

Sends a request asynchronously.

Parameters
requestArgsThe request parameters.
callbackBlockThe callback to execute with the resulting response.

◆ sendAsyncWithRequestArgsAndCallbackBlock

- (FMLiveSwitchHttpResponseArgs*) sendAsyncWithRequestArgsAndCallbackBlock

Sends a request asynchronously.

@inlineparam requestArgs The request parameters. @inlineparam callbackBlock The callback to execute with the resulting response.

◆ sendBinaryAsyncWithRequestArgs:callback:

- (void) sendBinaryAsyncWithRequestArgs: (FMLiveSwitchHttpRequestArgs *)  requestArgs
callback: (FMLiveSwitchAction1< FMLiveSwitchHttpResponseArgs * > *)  callback 

Sends binary content asynchronously using the specified arguments.

Parameters
requestArgsThe request arguments.
callbackThe callback to execute on success or failure.

◆ sendBinaryAsyncWithRequestArgs:callbackBlock:

- (void) sendBinaryAsyncWithRequestArgs: (FMLiveSwitchHttpRequestArgs *)  requestArgs
callbackBlock: (void(^)(FMLiveSwitchHttpResponseArgs *))  callbackBlock 

Sends binary content asynchronously using the specified arguments.

Parameters
requestArgsThe request arguments.
callbackBlockThe callback to execute on success or failure.

◆ sendBinaryAsyncWithRequestArgsAndCallbackBlock

- (FMLiveSwitchHttpResponseArgs*) sendBinaryAsyncWithRequestArgsAndCallbackBlock

Sends binary content asynchronously using the specified arguments.

@inlineparam requestArgs The request arguments. @inlineparam callbackBlock The callback to execute on success or failure.

◆ sendBinaryWithRequestArgs:

- (FMLiveSwitchHttpResponseArgs*) sendBinaryWithRequestArgs: (FMLiveSwitchHttpRequestArgs *)  requestArgs

Sends binary content synchronously using the specified arguments.

Parameters
requestArgsThe request arguments.
Returns
The response arguments from the server.

◆ sendTextAsyncWithRequestArgs:callback:

- (void) sendTextAsyncWithRequestArgs: (FMLiveSwitchHttpRequestArgs *)  requestArgs
callback: (FMLiveSwitchAction1< FMLiveSwitchHttpResponseArgs * > *)  callback 

Sends text content asynchronously using the specified arguments.

Parameters
requestArgsThe request arguments.
callbackThe callback to execute on success or failure.

◆ sendTextAsyncWithRequestArgs:callbackBlock:

- (void) sendTextAsyncWithRequestArgs: (FMLiveSwitchHttpRequestArgs *)  requestArgs
callbackBlock: (void(^)(FMLiveSwitchHttpResponseArgs *))  callbackBlock 

Sends text content asynchronously using the specified arguments.

Parameters
requestArgsThe request arguments.
callbackBlockThe callback to execute on success or failure.

◆ sendTextAsyncWithRequestArgsAndCallbackBlock

- (FMLiveSwitchHttpResponseArgs*) sendTextAsyncWithRequestArgsAndCallbackBlock

Sends text content asynchronously using the specified arguments.

@inlineparam requestArgs The request arguments. @inlineparam callbackBlock The callback to execute on success or failure.

◆ sendTextWithRequestArgs:

- (FMLiveSwitchHttpResponseArgs*) sendTextWithRequestArgs: (FMLiveSwitchHttpRequestArgs *)  requestArgs

Sends text content synchronously using the specified arguments.

Parameters
requestArgsThe request arguments.
Returns
The response arguments from the server.

◆ sendWithRequestArgs:

- (FMLiveSwitchHttpResponseArgs*) sendWithRequestArgs: (FMLiveSwitchHttpRequestArgs *)  requestArgs

Sends a request synchronously.

Parameters
requestArgsThe request parameters.
Returns
The resulting response.

◆ setWildcardCharacters:

+ (void) setWildcardCharacters: (NSString *)  value

Sets the wildcard characters used to replace asterisks in ReplaceWildcards.

◆ shutdown

- (void) shutdown

Releases any resources and shuts down.

◆ wildcardCharacters

+ (NSString*) wildcardCharacters

Gets the wildcard characters used to replace asterisks in ReplaceWildcards.