Up
Authors
- Generated by fedor
-
- Declared in:
- Foundation/NSURLRequest.h
Availability: MacOS-X 10.2.0, Base 1.13.0
Description forthcoming.
Method summary
- (void)
setCachePolicy: (
NSURLRequestCachePolicy)cachePolicy;
Availability: MacOS-X 10.2.0, Base 1.13.0
Sets the receiver's cache policy.
- (void)
setMainDocumentURL: (
NSURL*)URL;
Availability: MacOS-X 10.2.0, Base 1.13.0
Sets the receiver's main document.
- (void)
setTimeoutInterval: (
NSTimeInterval)seconds;
Availability: MacOS-X 10.2.0, Base 1.13.0
Sets the receiver's timeout policy.
- (void)
setURL: (
NSURL*)URL;
Availability: MacOS-X 10.2.0, Base 1.13.0
Sets the receiver's URL
- Declared in:
- Foundation/NSURLRequest.h
- Conforms to:
- NSCoding
- NSCopying
- NSMutableCopying
Availability: MacOS-X 10.2.0, Base 1.13.0
This class encapsulates information about a request to
load a URL, how to cache the results, and when to deal
with a slow/hung load process by timing out.
Instance Variables
Method summary
+ (id)
requestWithURL: (
NSURL*)URL;
Availability: MacOS-X 10.2.0, Base 1.13.0
Description forthcoming.
+ (id)
requestWithURL: (
NSURL*)URL
cachePolicy: (
NSURLRequestCachePolicy)cachePolicy
timeoutInterval: (
NSTimeInterval)timeoutInterval;
Availability: MacOS-X 10.2.0, Base 1.13.0
Returns an autoreleased instance initialised with
the specified URL, cachePolicy,
and timeoutInterval.
- (
NSURL*)
URL;
Availability: MacOS-X 10.2.0, Base 1.13.0
Returns the URL associated with the receiver.
- (
NSURLRequestCachePolicy)
cachePolicy;
Availability: MacOS-X 10.2.0, Base 1.13.0
Returns the cache policy associated with the
receiver.
- (id)
initWithURL: (
NSURL*)URL;
Availability: MacOS-X 10.2.0, Base 1.13.0
Initialises the reveiver with the specified
URL and with the default cache policy
(NSURLRequestUseProtocolCachePolicy)
and a sixty second timeout.
- (id)
initWithURL: (
NSURL*)URL
cachePolicy: (
NSURLRequestCachePolicy)cachePolicy
timeoutInterval: (
NSTimeInterval)timeoutInterval;
Availability: MacOS-X 10.2.0, Base 1.13.0
Initialises the receiver with the specified
URL, cachePolicy, and
timeoutInterval.
- (
NSURL*)
mainDocumentURL;
Availability: MacOS-X 10.2.0, Base 1.13.0
Returns the main document URL for the receiver.
Currently unused.
This is intended for
use with frames and similar situations where a main
document has a large number of subsidiary
documents.
- (
NSTimeInterval)
timeoutInterval;
Availability: MacOS-X 10.2.0, Base 1.13.0
Returns the timeout interval associated with the
receiver.
This is a value in seconds
specifying how long the load
process may be inactive (waiting for data to arrive
from the server) before the load is mconsidered to
have failed due to a timeout.
Instance Variables for NSURLRequest Class
@protected void* _NSURLRequestInternal;
Availability: MacOS-X 10.2.0, Base 1.13.0
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
- Declared in:
- Foundation/NSURLRequest.h
Availability: MacOS-X 10.2.0, Base 1.13.0
Description forthcoming.
Method summary
- (void)
addValue: (
NSString*)value
forHTTPHeaderField: (
NSString*)field;
Availability: MacOS-X 10.2.0, Base 1.13.0
Appends the value to the specified
header field, automatically inserting a
comman field delimiter if necessary.
- (void)
setAllHTTPHeaderFields: (
NSDictionary*)headerFields;
Availability: MacOS-X 10.2.0, Base 1.13.0
Sets all the string values in the supplied
headerFields dictionary as header values
in the receiver.
Non-string values are ignored.
- (void)
setHTTPBody: (
NSData*)data;
Availability: MacOS-X 10.2.0, Base 1.13.0
- (void)
setHTTPBodyStream: (
NSInputStream*)inputStream;
Availability: MacOS-X 10.4.0, Base 1.13.0
Sets the request body to be the contents of the given
stream.
The stream should be unopened when
it is set, and the load process for the request will
open the stream and read its entire content forwarding
it to the remote server.
Clears any value
previously set by
-setHTTPBody:
or
-setHTTPBodyStream:
- (void)
setHTTPMethod: (
NSString*)method;
Availability: MacOS-X 10.2.0, Base 1.13.0
Sets the method of the receiver.
- (void)
setHTTPShouldHandleCookies: (BOOL)should;
Availability: MacOS-X 10.2.0, Base 1.13.0
Sets a flag to say whether cookies should
automatically be added to the request and
whether cookies in the response should
be used.
- (void)
setValue: (
NSString*)value
forHTTPHeaderField: (
NSString*)field;
Availability: MacOS-X 10.2.0, Base 1.13.0
Sets the value for the sapecified header
field, replacing any previously set
value.
- Declared in:
- Foundation/NSURLRequest.h
Availability: MacOS-X 10.2.0, Base 1.13.0
HTTP specific additions to NSURLRequest
Method summary
- (
NSData*)
HTTPBody;
Availability: MacOS-X 10.2.0, Base 1.13.0
Returns the body of the reques... this is the data
sent in a POST request.
- (
NSInputStream*)
HTTPBodyStream;
Availability: MacOS-X 10.4.0, Base 1.13.0
Returns the currently set stream (if any) to be
used to provide data to send as the request body.
Of course, any attempt to modify this stream
may mess up the load operation in progress.
- (
NSString*)
HTTPMethod;
Availability: MacOS-X 10.2.0, Base 1.13.0
Returns the HTTP method assiciated with the
receiver.
- (BOOL)
HTTPShouldHandleCookies;
Availability: MacOS-X 10.2.0, Base 1.13.0
Returns a flag indicating whether this request
should use standard cookie handling (sending of
cookies with the request and storing any cookies
returned in the response.
- (
NSDictionary*)
allHTTPHeaderFields;
Availability: MacOS-X 10.2.0, Base 1.13.0
Returns a dictionary of the HTTP header fields
associated with the receiver.
- (
NSString*)
valueForHTTPHeaderField: (
NSString*)field;
Availability: MacOS-X 10.2.0, Base 1.13.0
Returns the value for a particular HTTP header
field (by case insensitive comparison) or
nil
if no such header is set.
Up