共用方式為


Sys.Net.WebRequestExecutor.getResponseHeader Method

Gets the value of the specified response header.

var responseHeader = MyExecutor.getResponseHeader();

Return Value

The specified response header.

Remarks

If a request finished successfully and with valid response data, this method returns the value of the specified response header.

Example

The following example shows how to use the getResponseHeader method by using the default Sys.Net.XMLHttpExecutor class.

// Get a specific header.
resultElementId.innerHTML += 
"Content-Type Header: " +
    executor.getResponseHeader("Content-Type") + 
    "<br/>";       

See Also

Reference

Sys.Net.WebRequestManager Class

Sys.Net.WebRequest Class

Sys.Net.XMLHttpExecutor Class