ObjFW
|
A delegate for OFHTTPClient. More...
#import <ObjFW/OFHTTPClient.h>
Instance Methods | |
(void) | - client:didCreateSocket:request: |
A callback which is called when an OFHTTPClient creates a socket. More... | |
(void) | - client:didReceiveHeaders:statusCode:request: |
A callback which is called when an OFHTTPClient received headers. More... | |
(bool) | - client:shouldFollowRedirect:statusCode:request: |
A callback which is called when an OFHTTPClient wants to follow a redirect. More... | |
Instance Methods inherited from <OFObject> | |
(Class) | - class |
Returns the class of the object. More... | |
(Class) | - superclass |
Returns the superclass of the object. More... | |
(bool) | - isKindOfClass: |
Returns a boolean whether the object of the specified kind. More... | |
(bool) | - isMemberOfClass: |
Returns a boolean whether the object is a member of the specified class. More... | |
(bool) | - respondsToSelector: |
Returns a boolean whether the object responds to the specified selector. More... | |
(bool) | - conformsToProtocol: |
Checks whether the object conforms to the specified protocol. More... | |
(nullable IMP) | - methodForSelector: |
Returns the implementation for the specified selector. More... | |
(nullable const char *) | - typeEncodingForSelector: |
Returns the type encoding for the specified selector. More... | |
(nullable id) | - performSelector: |
Performs the specified selector. More... | |
(nullable id) | - performSelector:withObject: |
Performs the specified selector with the specified object. More... | |
(nullable id) | - performSelector:withObject:withObject: |
Performs the specified selector with the specified objects. More... | |
(bool) | - isEqual: |
Checks two objects for equality. More... | |
(uint32_t) | - hash |
Calculates a hash for the object. More... | |
(id) | - retain |
Increases the retain count. More... | |
(unsigned int) | - retainCount |
Returns the retain count. More... | |
(void) | - release |
Decreases the retain count. More... | |
(id) | - autorelease |
Adds the object to the topmost OFAutoreleasePool of the thread's autorelease pool stack. More... | |
(id) | - self |
Returns the receiver. More... | |
(bool) | - isProxy |
Returns whether the object is a proxy object. More... | |
A delegate for OFHTTPClient.
|
optional |
A callback which is called when an OFHTTPClient creates a socket.
This is useful if the connection is using HTTPS and the server requires a client certificate. This callback can then be used to tell the TLS socket about the certificate. Another use case is to tell the socket about a SOCKS5 proxy it should use for this connection.
client | The OFHTTPClient that created a socket |
socket | The socket created by the OFHTTPClient |
request | The request for which the socket was created |
|
optional |
A callback which is called when an OFHTTPClient received headers.
client | The OFHTTPClient which received the headers |
headers | The headers received |
statusCode | The status code received |
request | The request for which the headers and status code have been received |
|
optional |
A callback which is called when an OFHTTPClient wants to follow a redirect.
If you want to get the headers and data for each redirect, set the number of redirects to 0 and perform a new OFHTTPClient for each redirect. However, this callback will not be called then and you have to look at the status code to detect a redirect.
This callback will only be called if the OFHTTPClient will follow a redirect. If the maximum number of redirects has been reached already, this callback will not be called.
client | The OFHTTPClient which wants to follow a redirect |
URL | The URL to which it will follow a redirect |
statusCode | The status code for the redirection |
request | The request for which the OFHTTPClient wants to redirect |