From 8024f6a80484dfa0f485f076adf77dffb0f01347 Mon Sep 17 00:00:00 2001 From: Andrew Hankinson Date: Thu, 4 Dec 2014 15:12:11 -0500 Subject: [PATCH] Fixed: Move CPURLRequest methods to @accessors This commit changes the simple getters/setters from CPURLRequest to use @accessors. --- Foundation/CPURLRequest.j | 59 ++++----------------------------------- 1 file changed, 5 insertions(+), 54 deletions(-) diff --git a/Foundation/CPURLRequest.j b/Foundation/CPURLRequest.j index 703c81bcc..b643264a3 100644 --- a/Foundation/CPURLRequest.j +++ b/Foundation/CPURLRequest.j @@ -35,12 +35,13 @@ */ @implementation CPURLRequest : CPObject { - CPURL _URL; + CPURL _URL @accessors(property=URL); // FIXME: this should be CPData - CPString _HTTPBody; - CPString _HTTPMethod; - CPDictionary _HTTPHeaderFields; + CPString _HTTPBody @accessors(property=HTTPBody); + CPString _HTTPMethod @accessors(property=HTTPMethod); + + CPDictionary _HTTPHeaderFields @accessors(readonly, getter=allHTTPHeaderFields); } /*! @@ -87,14 +88,6 @@ return self; } -/*! - Returns the request URL -*/ -- (CPURL)URL -{ - return _URL; -} - /*! Sets the URL for this request. @param aURL the new URL @@ -105,48 +98,6 @@ _URL = new CFURL(aURL); } -/*! - Sets the HTTP body for this request - @param anHTTPBody the new HTTP body -*/ -- (void)setHTTPBody:(CPString)anHTTPBody -{ - _HTTPBody = anHTTPBody; -} - -/*! - Returns the request's http body. -*/ -- (CPString)HTTPBody -{ - return _HTTPBody; -} - -/*! - Sets the request's http method. - @param anHTPPMethod the new http method -*/ -- (void)setHTTPMethod:(CPString)anHTTPMethod -{ - _HTTPMethod = anHTTPMethod; -} - -/*! - Returns the request's http method -*/ -- (CPString)HTTPMethod -{ - return _HTTPMethod; -} - -/*! - Returns a dictionary of the http header fields -*/ -- (CPDictionary)allHTTPHeaderFields -{ - return _HTTPHeaderFields; -} - /*! Returns the value for the specified header field. @param aField the header field to obtain a value for