ObjFW  Diff

Differences From Artifact [498ef03a59]:

To Artifact [1e129050da]:


21
22
23
24
25
26
27

28
29
30
31
32
33
34
#import "OFHTTPRequest.h"
#import "OFString.h"
#import "OFURL.h"
#import "OFTCPSocket.h"
#import "OFDictionary.h"
#import "OFAutoreleasePool.h"
#import "OFExceptions.h"


Class of_http_request_tls_socket_class = Nil;

@implementation OFHTTPRequest
+ request
{
	return [[[self alloc] init] autorelease];







>







21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#import "OFHTTPRequest.h"
#import "OFString.h"
#import "OFURL.h"
#import "OFTCPSocket.h"
#import "OFDictionary.h"
#import "OFAutoreleasePool.h"
#import "OFExceptions.h"
#import "macros.h"

Class of_http_request_tls_socket_class = Nil;

@implementation OFHTTPRequest
+ request
{
	return [[[self alloc] init] autorelease];
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
	[headers release];

	[super dealloc];
}

- (void)setURL: (OFURL*)url
{
	OFURL *old = URL;
	URL = [url copy];
	[old release];
}

- (OFURL*)URL
{
	return [[URL copy] autorelease];
}

- (void)setRequestType: (of_http_request_type_t)type
{
	requestType = type;
}

- (of_http_request_type_t)requestType
{
	return requestType;
}

- (void)setQueryString: (OFString*)qs
{
	OFString *old = queryString;
	queryString = [qs copy];
	[old release];
}

- (OFString*)queryString
{
	return [[queryString copy] autorelease];
}

- (void)setHeaders: (OFDictionary*)headers_
{
	OFDictionary *old = headers;
	headers = [headers_ copy];
	[old release];
}

- (OFDictionary*)headers
{
	return [[headers copy] autorelease];
}

- (OFHTTPRequestResult*)perform
{
	return [self performWithRedirects: 10];
}








|
<
<




|














<
|
<




|




|
<
<




|







55
56
57
58
59
60
61
62


63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81

82

83
84
85
86
87
88
89
90
91
92


93
94
95
96
97
98
99
100
101
102
103
104
	[headers release];

	[super dealloc];
}

- (void)setURL: (OFURL*)url
{
	OF_SETTER(URL, url, YES, YES)


}

- (OFURL*)URL
{
	OF_GETTER(URL, YES)
}

- (void)setRequestType: (of_http_request_type_t)type
{
	requestType = type;
}

- (of_http_request_type_t)requestType
{
	return requestType;
}

- (void)setQueryString: (OFString*)qs
{

	OF_SETTER(queryString, qs, YES, YES)

}

- (OFString*)queryString
{
	OF_GETTER(queryString, YES)
}

- (void)setHeaders: (OFDictionary*)headers_
{
	OF_SETTER(headers, headers_, YES, YES)


}

- (OFDictionary*)headers
{
	OF_GETTER(headers, YES)
}

- (OFHTTPRequestResult*)perform
{
	return [self performWithRedirects: 10];
}