ObjFW  Diff

Differences From Artifact [2ca5d029e3]:

To Artifact [22005b677b]:


18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#import "OFString.h"

#ifndef OF_HAVE_SOCKETS
# error No sockets available!
#endif

@class OFURL;
@class OFDictionary;
@class OFDataArray;
@class OFString;

/*! @file */

/*!
 * @brief The type of an HTTP request.







|







18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#import "OFString.h"

#ifndef OF_HAVE_SOCKETS
# error No sockets available!
#endif

@class OFURL;
@class OFDictionary OF_GENERIC(KeyType, ObjectType);
@class OFDataArray;
@class OFString;

/*! @file */

/*!
 * @brief The type of an HTTP request.
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
 * @brief A class for storing HTTP requests.
 */
@interface OFHTTPRequest: OFObject <OFCopying>
{
	OFURL *_URL;
	of_http_request_method_t _method;
	of_http_request_protocol_version_t _protocolVersion;
	OFDictionary *_headers;
	OFDataArray *_body;
	OFString *_remoteAddress;
}

#ifdef OF_HAVE_PROPERTIES
@property (copy) OFURL *URL;
@property of_http_request_method_t method;
@property of_http_request_protocol_version_t protocolVersion;
@property (copy) OFDictionary *headers;
@property (retain) OFDataArray *body;
@property (copy) OFString *remoteAddress;
#endif

/*!
 * @brief Creates a new OFHTTPRequest.
 *







|








|







69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
 * @brief A class for storing HTTP requests.
 */
@interface OFHTTPRequest: OFObject <OFCopying>
{
	OFURL *_URL;
	of_http_request_method_t _method;
	of_http_request_protocol_version_t _protocolVersion;
	OFDictionary OF_GENERIC(OFString*, OFString*) *_headers;
	OFDataArray *_body;
	OFString *_remoteAddress;
}

#ifdef OF_HAVE_PROPERTIES
@property (copy) OFURL *URL;
@property of_http_request_method_t method;
@property of_http_request_protocol_version_t protocolVersion;
@property (copy) OFDictionary OF_GENERIC(OFString*, OFString*) *headers;
@property (retain) OFDataArray *body;
@property (copy) OFString *remoteAddress;
#endif

/*!
 * @brief Creates a new OFHTTPRequest.
 *
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
- (OFString*)protocolVersionString;

/*!
 * @brief Sets a dictionary with headers for the HTTP request.
 *
 * @param headers A dictionary with headers for the HTTP request
 */
- (void)setHeaders: (OFDictionary*)headers;

/*!
 * @brief Returns a dictionary with headers for the HTTP request.
 *
 * @return A dictionary with headers for the HTTP request.
 */
- (OFDictionary*)headers;

/*!
 * @brief Sets the entity body of the HTTP request.
 *
 * @param body The entity body of the HTTP request
 */
- (void)setBody: (OFDataArray*)body;







|






|







168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
- (OFString*)protocolVersionString;

/*!
 * @brief Sets a dictionary with headers for the HTTP request.
 *
 * @param headers A dictionary with headers for the HTTP request
 */
- (void)setHeaders: (OFDictionary OF_GENERIC(OFString*, OFString*)*)headers;

/*!
 * @brief Returns a dictionary with headers for the HTTP request.
 *
 * @return A dictionary with headers for the HTTP request.
 */
- (OFDictionary OF_GENERIC(OFString*, OFString*)*)headers;

/*!
 * @brief Sets the entity body of the HTTP request.
 *
 * @param body The entity body of the HTTP request
 */
- (void)setBody: (OFDataArray*)body;