Class
WebResponse
Description
The response to a WebRequest.
Methods
Property descriptions
WebResponse.MIMEType
MIMEType As String
Gets or sets the HTTP "Content-Type" header.
This property is read-only.
The default value is "text/html".
WebResponse.Status
Status As Integer
Gets or sets the HTTP response status.
This property is read-only.
Common values are 200, 301, 302, 403, 404, and 500. The default value is 200. The complete list of valid status codes is available at http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html.
Method descriptions
WebResponse.ClearCookie
ClearCookie(Name As String, Domain As String = ".", Path As String = "/", Secure As Boolean = False, HTTPOnly As Boolean = False)
Clears all data from the cookie at the location specified.
WebResponse.Header
Header(name As String) As String
Gets or sets a response header using the specified Name. Setting a header to a blank string removes the header.
WebResponse.Reset
Reset
Resets the request object back to its original state.
WebResponse.SetCookie
SetCookie(Name As String, Value As String, Expiration As DateTime = Nil, Domain As String = ".", Path As String = "/", Secure As Boolean = False, HTTPOnly As Boolean = False)
Sets the value of the Name cookie. The Domain and Path must exactly match the values that were used to create the cookie.
WebResponse.Write
Write(data As String)
Adds the data to the response.
Notes
You are most likely to use this in conjunction with an including WebRequest via the WebApplication.HandleURL event handler. This event handler supplies a parameter (Response As WebResponse) that you can use to send out a reply.
Compatibility
Web projects on all supported operating systems.
See also
Object parent class; WebApplication.HandleURL event and WebRequest class.