Class IWebRequestManager

Manages the flow of the Web requests issued by the Sys.Net.WebRequest object to the associated executor object.

see

{@link http://msdn.microsoft.com/en-us/library/bb397435(v=vs.100).aspx}

Index

Constructor methods

Methods

Constructor methods

constructor(): IWebRequestManager

Initializes a new instance of the Sys.Net.WebRequestManager class when implemented in a derived class.

Returns

IWebRequestManager

Methods

public add_completedRequest(handler: (sender: any, eventArgs: any) => void)

Registers a handler for the completed request event of the WebRequestManager.

Parameters

  • handler: (sender: any, eventArgs: any) => void
     The function registered to handle the completed request event.
    

public add_invokingRequest(handler: (sender: any, networkRequestEventArgs: any) => void)

Registers a handler for processing the invoking request event of the WebRequestManager.

Parameters

  • handler: (sender: any, networkRequestEventArgs: any) => void
     The function registered to handle the invoking request event.
    

public executeRequest(WebRequest: WebRequest)

Sends Web requests to the default network executor. This member supports the client-script infrastructure and is not intended to be used directly from your code.

Parameters

  • WebRequest: WebRequest
     An instance of the Sys.Net.WebRequest class.
    

public get_defaultExecutorType(): WebRequestExecutor

Gets or sets the default network executor type that is used to make network requests.

Returns

WebRequestExecutor

 The object that represents the default Web request executor.

public get_defaultTimeout(): number

Gets or sets the time-out for the default network executor.

Returns

number

 An integer value that indicates the current time-out for the default executor.

public remove_completedRequest(handler: Function)

Removes the event handler set by the addcompletedRequest method. Use the remove completedRequest method to remove the event handler you set using the add_ completedRequest method.

Parameters

  • handler: Function
     The function that handles the completed request event.
    

public remove_invokingRequest(handler: Function)

Removes the event handler set by the add_invokingRequest method. Use the remove_invokingRequest method to remove the event handler you set using the add_invokingRequest method.

Parameters

  • handler: Function
         The function that handles the invoking request event.
    

public set_defaultExecutorType(value: WebRequestExecutor)

Gets or sets the default network executor type that is used to make network requests.

Parameters

  • value: WebRequestExecutor
         A reference to an implementation of the WebRequestExecutor class.
    

public set_defaultTimeout(value: number)

Gets or sets the time-out for the default network executor.

throws

Sys.ArgumentOutOfRangeException An invalid parameter was passed.

Parameters

  • value: number
         The time in milliseconds that the default executor should wait before timing out a Web request. This value must be 0 or a positive integer.