%WebStress.HttpResponse
Class %WebStress.HttpResponse Extends %RegisteredObject [ System = 3 ]
This class encapsulates the response from the web server.
Properties
Data
Property Data As %RawString;
The stream contains all the data sent by the web server after the HTTP headers
StatusLine
Property StatusLine As %String;
The HTTP status line. This is the first line of the response and signals if the request was successful or if there was a problem.
HttpVersion
Property HttpVersion As %String;
The version of HTTP that the server supports.
StatusCode
Property StatusCode As %Integer;
The HTTP status code. This is useful to determine if the request was successful. Look in the rfc for HTTP to see which codes are supported and what they mean. A human readable form of this code is stored as the ReasonPhrase
ReasonPhrase
Property ReasonPhrase As %String;
This is the human readable reason that goes with the StatusCode.
Headers
Property Headers As %String [ MultiDimensional ];
Storage for the HTTP headers in the reply.
ContentType
Property ContentType As %String;
Value of the HTTP 'Content-Type:' header.
ContentLength
Property ContentLength As %String;
Length of the Data. Comes from the HTTP 'Content-Length:' header.
ContentBoundary
Property ContentBoundary As %String;
If specified the boundary signal for the Data
ContentInfo
Property ContentInfo As %String;
Additional information specified in the HTTP headers about the Data.
Methods
SetHeader
Method SetHeader(name As %String, value As %String)
Used internally to set a header name and value. This can also be called externally if you want to record another header value.
RemoveHeader
Method RemoveHeader(name As %String)
GetHeader
Method GetHeader(name As %String) As %String [ CodeMode = expression ]
Get the value associated with this header.
GetNextHeader
Method GetNextHeader(name As %String) As %String [ CodeMode = expression ]
Return the name of the next header that was received from the web server.
OutputHeaders
Method OutputHeaders()
Output the HTTP headers from the web server to the current device. The headers will not be in the same order but this does not alter the semantics.
OutputToDevice
Method OutputToDevice()
Output the full response from the web server to the current device. The headers will not be in the same order but this does not alter the semantics. This is useful to see what the web server sent back.