ObjFW  Diff

Differences From Artifact [c71064978e]:

To Artifact [7ce0d63ac4]:


69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
 */
@interface OFHTTPRequest: OFObject <OFCopying>
{
	OFURL *_URL;
	of_http_request_method_t _method;
	of_http_request_protocol_version_t _protocolVersion;
	OFDictionary OF_GENERIC(OFString *, OFString *) *_Nullable _headers;
	OFData *_Nullable _body;
	OFString *_Nullable _remoteAddress;
}

/*!
 * @brief The URL of the HTTP request.
 */
@property (copy, nonatomic) OFURL *URL;







<







69
70
71
72
73
74
75

76
77
78
79
80
81
82
 */
@interface OFHTTPRequest: OFObject <OFCopying>
{
	OFURL *_URL;
	of_http_request_method_t _method;
	of_http_request_protocol_version_t _protocolVersion;
	OFDictionary OF_GENERIC(OFString *, OFString *) *_Nullable _headers;

	OFString *_Nullable _remoteAddress;
}

/*!
 * @brief The URL of the HTTP request.
 */
@property (copy, nonatomic) OFURL *URL;
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117

/*!
 * @brief The headers for the HTTP request.
 */
@property OF_NULLABLE_PROPERTY (copy, nonatomic)
    OFDictionary OF_GENERIC(OFString *, OFString *) *headers;

/*!
 * @brief The entity body of the HTTP request.
 */
@property OF_NULLABLE_PROPERTY (copy, nonatomic) OFData *body;

/*!
 * @brief The remote address from which the request originates.
 */
@property OF_NULLABLE_PROPERTY (copy, nonatomic) OFString *remoteAddress;

/*!
 * @brief Creates a new OFHTTPRequest.







<
<
<
<
<







98
99
100
101
102
103
104





105
106
107
108
109
110
111

/*!
 * @brief The headers for the HTTP request.
 */
@property OF_NULLABLE_PROPERTY (copy, nonatomic)
    OFDictionary OF_GENERIC(OFString *, OFString *) *headers;






/*!
 * @brief The remote address from which the request originates.
 */
@property OF_NULLABLE_PROPERTY (copy, nonatomic) OFString *remoteAddress;

/*!
 * @brief Creates a new OFHTTPRequest.
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
/*!
 * @brief Sets the protocol version of the HTTP request to the version
 *	  described by the specified string.
 *
 * @param string A string describing an HTTP version
 */
- (void)setProtocolVersionFromString: (OFString *)string;

/*!
 * @brief Sets the entity body of the HTTP request to the specified string
 *	  encoded in UTF-8.
 *
 * @param string The string to use for the entity body
 */
- (void)setBodyFromString: (OFString *)string;

/*!
 * @brief Sets the entity body of the HTTP request to the specified string
 *	  encoded in the specified encoding.
 *
 * @param string The string to use for the entity body
 * @param encoding The encoding to encode the string with
 */
- (void)setBodyFromString: (OFString *)string
		 encoding: (of_string_encoding_t)encoding;
@end

#ifdef __cplusplus
extern "C" {
#endif
/*!
 * @brief Returns a C string describing the specified request method.







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







133
134
135
136
137
138
139


















140
141
142
143
144
145
146
/*!
 * @brief Sets the protocol version of the HTTP request to the version
 *	  described by the specified string.
 *
 * @param string A string describing an HTTP version
 */
- (void)setProtocolVersionFromString: (OFString *)string;


















@end

#ifdef __cplusplus
extern "C" {
#endif
/*!
 * @brief Returns a C string describing the specified request method.