Interface Xhr

Index

Properties

Methods

Properties

public header: { (name: string): string; (name: string, value: string): D3.Xhr; }

Get or set request header

(): string

Get the value of specified request header

Returns

string

(): Xhr

Set the value of specified request header

Returns

Xhr

public mimeType: { (): string; (type: string): D3.Xhr; }

Get or set MIME Type

(): string

Get the current MIME Type

Returns

string

(): Xhr

Set the MIME Type for the request

Returns

Xhr

public on: (type: string, listener: (data: any, index?: number) => any) => D3.Xhr

Registers a listener to receive events

param

Enent name to attach the listener to

param

Function to attach to event

public post: { (callback?: (xhr: XMLHttpRequest) => void): D3.Xhr; (data: any, callback?: (xhr: XMLHttpRequest) => void): D3.Xhr; }

Issue the request using the POST method

(): Xhr

Issue the request using the POST method

Returns

Xhr

(): Xhr

Issue the request using the POST method

Returns

Xhr

public response: { (): (xhr: XMLHttpRequest) => any; (value: (xhr: XMLHttpRequest) => any): D3.Xhr; }

(): (xhr: XMLHttpRequest) => any

Get function used to map the response to the associated data value

Returns

(xhr: XMLHttpRequest) => any

(): Xhr

Set function used to map the response to the associated data value

Returns

Xhr

public send: { (method: string, callback?: (xhr: XMLHttpRequest) => void): D3.Xhr; (method: string, data: any, callback?: (xhr: XMLHttpRequest) => void): D3.Xhr; }

Issues this request using the specified method

(): Xhr

Issues this request using the specified method

Returns

Xhr

(): Xhr

Issues this request using the specified method

Returns

Xhr

Methods

public abort(): Xhr

Aborts this request, if it is currently in-flight

Returns

Xhr

public get(callback?: (xhr: XMLHttpRequest) => void): Xhr

Issue the request using the GET method

Parameters

  • callback?: (xhr: XMLHttpRequest) => void optional

    Function to invoke on completion of request

Returns

Xhr