Class WebRequest

Provides the script API to make a Web request.

see

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

Index

Constructor methods

Methods

Constructor methods

constructor(): WebRequest

Initializes a new instance of the Sys.Net.WebRequest class.

Returns

WebRequest

Methods

public add_completed(handler: (reference: any, eventArgs: Sys.EventArgs) => void)

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

see

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

Parameters

  • handler: (reference: any, eventArgs: Sys.EventArgs) => void

public completed(eventArgs: EventArgs)

Raises the completed event for the associated Sys.Net.WebRequest instance.

Parameters

  • eventArgs: EventArgs
          The value to pass to the Web request completed event handler.
    

public getResolvedUrl(): string

Gets the resolved URL of the Sys.Net.WebRequest instance.

Returns

string

The resolved URL that the Web request is directed to.

public invoke()

Executes a Web request.

public remove_completed(handler: (reference: any, eventArgs: Sys.EventArgs) => void)

Removes the event handler added by the add_completed method.

see

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

Parameters

  • handler: (reference: any, eventArgs: Sys.EventArgs) => void