Class CPURLRequest

CPObject
    extended byCPURLRequest

@implementation CPURLRequest : CPObject

A helper object for CPURLConnection, that contains data obtained during the life of a request.


Method Summary
+(id)requestWithURL:(CPURL)aURL
          Creates a request with a specified URL.
-(id)initWithURL:(CPURL)aURL
          Initializes the request with a URL.
-(CPString)HTTPBody
          Returns the request's http body.
-(CPString)HTTPMethod
          Returns the request's http method.
-(CPURL)URL
          Returns the request URL.
-(CPDictionary)allHTTPHeaderFields
          Returns a dictionar of the http header fields.
-(void)setHTTPBody:(CPString)anHTTPBody
          Sets the HTTP body for this request.
-(void)setHTTPMethod:(CPString)anHTTPMethod
          Sets the request's http method.
-(void)setURL:(CPURL)aURL
          Sets the URL for this request.
-(void)setValue:(CPString)aValue forHTTPHeaderField:(CPString)aField
          Sets the value for the specified header field.
-(CPString)valueForHTTPHeaderField:(CPString)aField
          Returns the value for the specified header field.

Methods inherited from class CPObject
initialize, alloc, class, instanceMethodForSelector, instancesRespondToSelector, isSubclassOfClass, load, new, setVersion, superclass, version, init, autorelease, awakeAfterUsingCoder, class, classForCoder, classForKeyedArchiver, className, copy, dealloc, description, doesNotRecognizeSelector, forwardInvocation, hash, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableCopy, performSelector, performSelector, performSelector, release, replacementObjectForArchiver, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, retain, self, superclass


Method Detail

requestWithURL

+(id)requestWithURL:(CPURL)aURL
Creates a request with a specified URL.
Parameters:
aURL - the URL of the request
Returns:
a CPURLRequest

initWithURL

-(id)initWithURL:(CPURL)aURL
Initializes the request with a URL.
Parameters:
aURL - the url to set
Returns:
the initialized CPURLRequest

HTTPBody

-(CPString)HTTPBody
Returns the request's http body.

HTTPMethod

-(CPString)HTTPMethod
Returns the request's http method

URL

-(CPURL)URL
Returns the request URL

allHTTPHeaderFields

-(CPDictionary)allHTTPHeaderFields
Returns a dictionar of the http header fields

setHTTPBody

-(void)setHTTPBody:(CPString)anHTTPBody
Sets the HTTP body for this request
Parameters:
anHTTPBody - the new HTTP body

setHTTPMethod

-(void)setHTTPMethod:(CPString)anHTTPMethod
Sets the request's http method.
Parameters:
anHTTPMethod

setURL

-(void)setURL:(CPURL)aURL
Sets the URL for this request.
Parameters:
aURL - the new URL

setValue

-(void)setValue:(CPString)aValue forHTTPHeaderField:(CPString)aField
Sets the value for the specified header field.
Parameters:
aValue - the value for the header field
aField - the header field

valueForHTTPHeaderField

-(CPString)valueForHTTPHeaderField:(CPString)aField
Returns the value for the specified header field.
Parameters:
aField - the header field to obtain a value for

Created on Sat Sep 13 14:15:43 PDT 2008