36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
Class of_http_request_tls_socket_class = Nil;
@implementation OFHTTPRequest
+ request
{
return [[[self alloc] init] autorelease];
}
- init
{
self = [super init];
requestType = OF_HTTP_REQUEST_TYPE_GET;
headers = [[OFDictionary alloc]
initWithObject: @"Something using ObjFW "
@"<https://webkeks.org/objfw/>"
forKey: @"User-Agent"];
return self;
}
- (void)dealloc
{
[URL release];
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
Class of_http_request_tls_socket_class = Nil;
@implementation OFHTTPRequest
+ request
{
return [[[self alloc] init] autorelease];
}
+ requestWithURL: (OFURL*)url
{
return [[[self alloc] initWithURL: url] autorelease];
}
- init
{
self = [super init];
requestType = OF_HTTP_REQUEST_TYPE_GET;
headers = [[OFDictionary alloc]
initWithObject: @"Something using ObjFW "
@"<https://webkeks.org/objfw/>"
forKey: @"User-Agent"];
return self;
}
- initWithURL: (OFURL*)url
{
self = [self init];
@try {
[self setURL: url];
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
- (void)dealloc
{
[URL release];
|