ObjFW
|
A class for storing and performing HTTP requests. More...
#include <OFHTTPRequest.h>
Public Member Functions | |
id | initWithURL: (OFURL *url) |
void | setURL: (OFURL *url) |
OFURL * | URL () |
void | setRequestType: (of_http_request_type_t type) |
of_http_request_type_t | requestType () |
void | setQueryString: (OFString *qs) |
OFString * | queryString () |
void | setHeaders: (OFDictionary *headers) |
OFDictionary * | headers () |
void | setRedirectsFromHTTPSToHTTPAllowed: (BOOL allowed) |
BOOL | redirectsFromHTTPSToHTTPAllowed () |
OFHTTPRequestResult * | perform () |
OFHTTPRequestResult * | performWithRedirects: (size_t redirects) |
Static Public Member Functions | |
id | request () |
id | requestWithURL: (OFURL *url) |
Properties | |
OFURL * | URL |
of_http_request_type_t | requestType |
OFString * | queryString |
OFDictionary * | headers |
BOOL | redirectsFromHTTPSToHTTPAllowed |
A class for storing and performing HTTP requests.
OFDictionary* OFHTTPRequest::headers | ( | ) | [virtual] |
id OFHTTPRequest::initWithURL: | ( | OFURL* | url | ) | [virtual] |
Initializes an already allocated OFHTTPRequest with the specified URL.
url | The URL for the request |
OFHTTPRequestResult * OFHTTPRequest::perform | ( | ) | [virtual] |
Performs the HTTP request and returns an OFHTTPRequestResult.
OFHTTPRequestResult * OFHTTPRequest::performWithRedirects: | ( | size_t | redirects | ) | [virtual] |
Performs the HTTP request and returns an OFHTTPRequestResult.
redirects | The maximum number of redirects after which no further attempt is done to follow the redirect, but instead the redirect is returned as an OFHTTPRequest |
OFString* OFHTTPRequest::queryString | ( | ) | [virtual] |
BOOL OFHTTPRequest::redirectsFromHTTPSToHTTPAllowed | ( | ) | [virtual] |
id OFHTTPRequest::request | ( | ) | [static, virtual] |
of_http_request_type_t OFHTTPRequest::requestType | ( | ) | [virtual] |
id OFHTTPRequest::requestWithURL: | ( | OFURL* | url | ) | [static, virtual] |
url | The URL for the request |
void OFHTTPRequest::setHeaders: | ( | OFDictionary* | headers | ) | [virtual] |
Sets a dictionary with headers for the HTTP request.
headers | A dictionary with headers for the HTTP request |
void OFHTTPRequest::setQueryString: | ( | OFString* | qs | ) | [virtual] |
Sets the query string for the HTTP request.
qs | The query string for the HTTP request |
void OFHTTPRequest::setRedirectsFromHTTPSToHTTPAllowed: | ( | BOOL | allowed | ) | [virtual] |
Sets whether redirects from HTTPS to HTTP are allowed.
allowed | Whether 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.
type | The request type for the HTTP request |
void OFHTTPRequest::setURL: | ( | OFURL* | url | ) | [virtual] |
Sets the URL for the HTTP request.
URL | The URL for the HTTP request |
OFURL* OFHTTPRequest::URL | ( | ) | [virtual] |