Class HttpRequestMessage() Foundation

Class function of the HttpRequestMessage class.

Superclass
Description

Represents a HTTP request message composed of headers, the verb/method and optional content data. This class is used when additional control is required over the request to be send to the server.

Common usage scenarios deal with verbs/methods which are not used very often, sending files, adding parameters or controlling HTTP request header attributes.

Class Methods
:new()
Creates an instance of the HttpRequestMessage class.
Configuration
:setAcceptCharset()
Defines the accepted charset for responses from the server.
:setAcceptLanguage()
Defines the accepted language for responses from the server.
:setAcceptEncoding()
Defines the accepted encoding for responses from the server.
:setAcceptType()
Defines the accepted content type for responses from the server.
:setMethod()
Sets the request method.
Cookies
:delCookie()
Deletes a cookie.
:getCookie()
Gets a cookie given its name.
:getCookies()
Gets all cookies.
:setCookie()
Sets the value of a cookie.
HTTP Parameters
:addParameter()
Adds a HTTP parameter.
:delParameter()
Deletes a HTTP parameter.
:getParameter()
Gets the value of a HTTP parameter by its name.
:getParameters()
Gets multiple HTTP parameter values.
:setParameter()
Sets the value of a HTTP parameter.
:addFileParameter()
Adds a file parameter.
:setFileParameter()
Sets the value of a file parameter.
HTTP Query String
:getQueryString()
Gets the HTTP query string.
:setQueryString()
Sets the HTTP query string.
Manipulation
:getUri()
Gets the URI used for the HTTP request.
Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.