public class NSMutableURLRequest extends NSURLRequest
Constructor and Description |
---|
NSMutableURLRequest(NSURL request)
Constructs a NSMutableURLRequest object for the specified request.
|
NSMutableURLRequest(NSURL url,
int NSURLRequestCachePolicy,
double timeoutInterval)
Constructs a URL request object with the specified parameters.
|
Modifier and Type | Method and Description |
---|---|
void |
addValue(String value,
String header)
Adds the specified HTTP header to the HTTP header dictionary of this
object.
|
Map<String,String> |
allHTTPHeaderFields() |
NSData |
HTTPBody() |
static NSMutableURLRequest |
requestWithURL(NSURL theURL)
Constructs and returns a NSMutableURLRequest object with the specified
URL.
|
static NSMutableURLRequest |
requestWithURL(NSURL url,
int NSURLRequestCachePolicy,
double timeoutInterval)
Constructs and returns a NSMutableURLRequest object with the specified
parameters.
|
void |
setHTTPBody(NSData body)
Sets the data of this URL request object.
|
void |
setHTTPMethod(String method)
Sets the HTTP request method for this URL request object.
|
void |
setHTTPShouldHandleCookies(boolean HTTPShouldHandleCookies)
Sets a Boolean that defines whether this URL request object uses the
default cookie.
|
void |
setTimeoutInterval(double timeoutInterval)
Sets the timeout interval of the receiver expressed in seconds.
|
void |
setURL(NSURL url)
Sets the URL of this request.
|
double |
timeoutInterval()
Returns the timeout interval of the receiver expressed in seconds.
|
cachePolicy, HTTPShouldHandleCookies, toString, URL
addObserver, observeValueForKeyPath, performSelector, performSelectorOnMainThread, release, removeObserver, removeObserver, retain, setValueForKey, setValueForUndefinedKey, valueForKey, valueForUndefinedKey
public NSMutableURLRequest(NSURL request)
request
- The new NSMutableURLRequest object.public NSMutableURLRequest(NSURL url, int NSURLRequestCachePolicy, double timeoutInterval)
url
- The URL of the request.NSURLRequestCachePolicy
- The cache policy of this URL request
object.timeoutInterval
- The timeout interval of this URL request object.NSURLRequestCachePolicy
public static NSMutableURLRequest requestWithURL(NSURL theURL)
theURL
- The URL of the new NSMutableURLRequest object.public static NSMutableURLRequest requestWithURL(NSURL url, int NSURLRequestCachePolicy, double timeoutInterval)
url
- The URL of the request.NSURLRequestCachePolicy
- The cache policy of this URL request
object.timeoutInterval
- The timeout interval of this URL request object.public double timeoutInterval()
NSURLRequest
timeoutInterval
in class NSURLRequest
public void setTimeoutInterval(double timeoutInterval)
timeoutInterval
- The timeout interval of the receiver expressed in
seconds.public void setURL(NSURL url)
url
- The URL of this request.public void addValue(String value, String header)
value
- The HTTP header valueheader
- The name of the header fieldpublic void setHTTPMethod(String method)
method
- The HTTP request method for this URL request object.public void setHTTPBody(NSData body)
body
- The data of this URL request object.public NSData HTTPBody()
public void setHTTPShouldHandleCookies(boolean HTTPShouldHandleCookies)
HTTPShouldHandleCookies
- TRUE then the URL request object uses the
default cookie.Copyright © 2020. All rights reserved.