ObjFW
Public Member Functions | Static Public Member Functions | Properties
OFHTTPRequest Class Reference

A class for storing and performing HTTP requests. More...

#include <OFHTTPRequest.h>

Inheritance diagram for OFHTTPRequest:
OFObject <OFObject>

List of all members.

Public Member Functions

id initWithURL: (OFURL *url)
void setURL: (OFURL *url)
OFURLURL ()
void setRequestType: (of_http_request_type_t type)
of_http_request_type_t requestType ()
void setQueryString: (OFString *qs)
OFStringqueryString ()
void setHeaders: (OFDictionary *headers)
OFDictionaryheaders ()
void setRedirectsFromHTTPSToHTTPAllowed: (BOOL allowed)
BOOL redirectsFromHTTPSToHTTPAllowed ()
OFHTTPRequestResultperform ()
OFHTTPRequestResultperformWithRedirects: (size_t redirects)

Static Public Member Functions

id request ()
id requestWithURL: (OFURL *url)

Properties

OFURLURL
of_http_request_type_t requestType
OFStringqueryString
OFDictionaryheaders
BOOL redirectsFromHTTPSToHTTPAllowed

Detailed Description

A class for storing and performing HTTP requests.


Member Function Documentation

OFDictionary* OFHTTPRequest::headers ( ) [virtual]
Returns:
A dictionary with headers for the HTTP request.
id OFHTTPRequest::initWithURL: ( OFURL url) [virtual]

Initializes an already allocated OFHTTPRequest with the specified URL.

Parameters:
urlThe URL for the request
Returns:
An initialized OFHTTPRequest
OFHTTPRequestResult * OFHTTPRequest::perform ( ) [virtual]

Performs the HTTP request and returns an OFHTTPRequestResult.

Returns:
An OFHTTPRequestResult with the result of the HTTP request
OFHTTPRequestResult * OFHTTPRequest::performWithRedirects: ( size_t  redirects) [virtual]

Performs the HTTP request and returns an OFHTTPRequestResult.

Parameters:
redirectsThe maximum number of redirects after which no further attempt is done to follow the redirect, but instead the redirect is returned as an OFHTTPRequest
Returns:
An OFHTTPRequestResult with the result of the HTTP request
OFString* OFHTTPRequest::queryString ( ) [virtual]
Returns:
The query string for the HTTP request
BOOL OFHTTPRequest::redirectsFromHTTPSToHTTPAllowed ( ) [virtual]
Returns:
Whether redirects from HTTPS to HTTP are allowed
id OFHTTPRequest::request ( ) [static, virtual]
Returns:
A new, autoreleased OFHTTPRequest
of_http_request_type_t OFHTTPRequest::requestType ( ) [virtual]
Returns:
The request type for the HTTP request
id OFHTTPRequest::requestWithURL: ( OFURL url) [static, virtual]
Parameters:
urlThe URL for the request
Returns:
A new, autoreleased OFHTTPRequest
void OFHTTPRequest::setHeaders: ( OFDictionary headers) [virtual]

Sets a dictionary with headers for the HTTP request.

Parameters:
headersA dictionary with headers for the HTTP request
void OFHTTPRequest::setQueryString: ( OFString qs) [virtual]

Sets the query string for the HTTP request.

Parameters:
qsThe query string for the HTTP request
void OFHTTPRequest::setRedirectsFromHTTPSToHTTPAllowed: ( BOOL  allowed) [virtual]

Sets whether redirects from HTTPS to HTTP are allowed.

Parameters:
allowedWhether redirects from HTTPS to HTTP are allowed
void OFHTTPRequest::setRequestType: ( of_http_request_type_t  type) [virtual]

Sets the request type for the HTTP request.

Parameters:
typeThe request type for the HTTP request
void OFHTTPRequest::setURL: ( OFURL url) [virtual]

Sets the URL for the HTTP request.

Parameters:
URLThe URL for the HTTP request
OFURL* OFHTTPRequest::URL ( ) [virtual]
Returns:
The URL for the HTTP request

The documentation for this class was generated from the following files:
 All Classes Functions Variables