MTPocketRequest Class Reference
Inherits from | NSObject |
Declared in | MTPocketRequest.h |
Overview
MTPocketRequest
Use the convenience constructors to create a request and then call send
to make the request.
The convenience constructors will give you a “template” for a common request, but you can always
use the properties of this class to customize the request further.
Example: One shot
MTPocketResponse *response = [MTPocketRequest requestForURL:URL format:MTPocketFormatHTML].send;
Example: Customize
MTPocketRequest *request = [MTPocketRequest requestForURL:URL method:MTPocketMethodPost format:MTPocketFormatJSON body:@{"Name" : "Adam"}];
request.timeout = 60;
[request send];
Tasks
Other Methods
-
URL
property -
method
property -
format
property -
username
property -
password
property -
body
property -
headers
property -
timeout
property -
+ requestForURL:format:
-
+ requestForURL:method:format:body:
-
+ requestForURL:method:format:username:password:body:
-
– send
Extension Methods
-
response
property -
– initWithURL:
-
– requestWithResponse: