HTTP (pdk.net.http)
Contains structures that provide support for HTTP calls
Cookie
Represents an HTTP cookie, which carries state information between server and user agent. Cookie is widely adopted to create stateful sessions.
There are 3 HTTP cookie specifications:
Netscape draft RFC 2109 - http://www.ietf.org/rfc/rfc2109.txt RFC 2965 - http://www.ietf.org/rfc/rfc2965.txt
HttpCookie class can accept all these 3 forms of syntax.
Properties:
comment :: pdk.core.String
domain :: pdk.core.String
expiry :: pdk.core.Date
httpOnly :: pdk.core.Boolean
maxAge :: pdk.core.Integer
name :: pdk.core.String
path :: pdk.core.String
secure :: pdk.core.Boolean
value :: pdk.core.String
version :: pdk.core.Integer
Superstructures: Object <- Any
Header
HTTP request and response headers are represented by this structure. The name is case-insensitive strings representing the header name and the value associated with each name is an pdk.core.Array<pdk.core.String> with one element for each occurrence of the header name in the request or response.
For example, if a response header instance contains one key "HeaderName" with two values "value1 and value2" then this object is output as two header lines:
Properties:
name :: pdk.core.String
values :: pdk.core.Array<pdk.core.String>
Superstructures: Object <- Any
Request
Represents one HTTP request which can be sent to a server.
Properties:
cookie :: pdk.core.Array<pdk.net.Cookie>
data :: T
header :: pdk.core.Array<pdk.net.http.Header>
Superstructures: Object <- Any
Response
Represents a response to a HttpRequest
A HttpResponse
is available when the response status code and headers have been received, and typically after the response body has also been received. This depends on the response body handler provided when sending the request. In all cases, the response body handler is invoked before the body is read. This gives applications an opportunity to decide how to handle the body.
Methods are provided in this class for accessing the response headers, and response body.
Properties:
cookie :: pdk.core.Array<pdk.net.http.Cookie>
data :: T
errorData :: V
header :: pdk.core.Array<pdk.net.http.Header>
statusCode :: pdk.core.Integer
Superstructures: Object <- Any
EmptyRequest
Represents empty data to be sent. (e.g. POST method with no payload)
Superstructures: Object <- Any
EmptyResponse
Represents empty response data. (e.g. POST method that returns only status code)
Superstructures: Object <- Any
FormData
Represents form data that is submitted via an HTTP POST request.
Properties:
files :: pdk.core.Array<pdk.net.http.FileFormDataEntry>
parameters :: pdk.core.Array<pdk.net.http.TextFormDataEntry>
Superstructures: Object <- Any
FileFormDataEntry
Represents form data entry with file content.
Properties:
name :: pdk.core.String
value :: pdk.io.File
Superstructures: Object <- Any
TextFormDataEntry
Represents form data entry with text content.
Properties:
name :: pdk.core.String
value :: pdk.core.String
Superstructures: Object <- Any
Last updated