Difference between revisions of "WebResponse class"

From Catglobe Wiki
Jump to: navigation, search
Line 9: Line 9:
 
==== <span style="color:#a52a2a;">Properties</span>  ====
 
==== <span style="color:#a52a2a;">Properties</span>  ====
  
'''string CharacterSet HasGetter''' - Gets the character set of the response.<br>'''string ContentEncoding HasGetter''' - Gets the method that is used to encode the body of the response.<br>'''number ContentLength HasGetter''' - Gets the number of bytes of the content returned by the request.<br>'''string ContentType HasGetter''' - Gets the content type of the response.<br>'''Dictionary Headers HasGetter''' - Gets the headers that are associated with this response from the server.<br>'''DateTime LastModified HasGetter''' - Gets the last date and time that the contents of the response were modified.<br>'''string Method HasGetter''' - Gets the method that is used to return the response.<br>'''string ObjectTypeName HasGetter''' - The name of the type of object.<br>'''number StatusCode HasGetter''' - Gets the status of the response.<br>'''string StatusDescription HasGetter''' - Gets the status description returned with the response.<br>'''TypeInformation TypeInformation HasGetter''' - Get information about this class.<br>
+
'''string CharacterSet HasGetter''' - Gets the character set of the response.<br>'''string ContentEncoding HasGetter''' - Gets the method that is used to encode the body of the response.<br>'''number ContentLength HasGetter''' - Gets the number of bytes of the content returned by the request.<br>'''string ContentType HasGetter''' - Gets the content type of the response.<br>'''Dictionary Headers HasGetter''' - Gets the headers that are associated with this response from the server.<br>'''DateTime LastModified HasGetter''' - Gets the last date and time that the contents of the response were modified.<br>'''string Method HasGetter''' - Gets the method that is used to return the response.<br>'''string ObjectTypeName HasGetter''' - The name of the type of object.<br>'''number StatusCode HasGetter''' - Gets the status of the response.<br>'''string StatusDescription HasGetter''' - Gets the status description returned with the response.<br>'''TypeInformation TypeInformation HasGetter''' - Get information about this class.<br>
 +
 
 +
'''More information about an HTTP Message:''' [http://www.jmarshall.com/easy/http/ http://www.jmarshall.com/easy/http/]<br>
  
 
==== <span style="color:#a52a2a;">Examples</span>  ====
 
==== <span style="color:#a52a2a;">Examples</span>  ====

Revision as of 12:36, 15 September 2011

WebResponse : The response object from a http request

Constructors

Methods

string Response() - The response from the request
string Response(string encoding(Encoding to use to read the reply - See .NET Encoding.GetEncoding for further info)) - The response from the request with the encoding specified
string ToString() - The string representation of the object.

Properties

string CharacterSet HasGetter - Gets the character set of the response.
string ContentEncoding HasGetter - Gets the method that is used to encode the body of the response.
number ContentLength HasGetter - Gets the number of bytes of the content returned by the request.
string ContentType HasGetter - Gets the content type of the response.
Dictionary Headers HasGetter - Gets the headers that are associated with this response from the server.
DateTime LastModified HasGetter - Gets the last date and time that the contents of the response were modified.
string Method HasGetter - Gets the method that is used to return the response.
string ObjectTypeName HasGetter - The name of the type of object.
number StatusCode HasGetter - Gets the status of the response.
string StatusDescription HasGetter - Gets the status description returned with the response.
TypeInformation TypeInformation HasGetter - Get information about this class.

More information about an HTTP Message: http://www.jmarshall.com/easy/http/

Examples

string uri = "http://google.com";
string responseString;
HttpRequest hr = new HttpRequest(uri);
WebResponse wr = hr.GetResponse();
responseString = wr.Response();
print(responseString);