70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
if ([string isEqual: @"DELETE"])
return OFHTTPRequestMethodDelete;
if ([string isEqual: @"TRACE"])
return OFHTTPRequestMethodTrace;
if ([string isEqual: @"CONNECT"])
return OFHTTPRequestMethodConnect;
@throw [OFInvalidArgumentException exception];
}
@implementation OFHTTPRequest
@synthesize URL = _URL, method = _method, headers = _headers;
+ (instancetype)requestWithURL: (OFURL *)URL
{
|
|
|
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
if ([string isEqual: @"DELETE"])
return OFHTTPRequestMethodDelete;
if ([string isEqual: @"TRACE"])
return OFHTTPRequestMethodTrace;
if ([string isEqual: @"CONNECT"])
return OFHTTPRequestMethodConnect;
@throw [OFInvalidFormatException exception];
}
@implementation OFHTTPRequest
@synthesize URL = _URL, method = _method, headers = _headers;
+ (instancetype)requestWithURL: (OFURL *)URL
{
|