18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#include <string.h>
#import "OFHTTPRequest.h"
#import "OFString.h"
#import "OFURL.h"
#import "OFDictionary.h"
#import "OFDataArray.h"
#import "OFArray.h"
#import "OFInvalidFormatException.h"
#import "OFOutOfRangeException.h"
#import "OFUnsupportedVersionException.h"
const char *
|
|
|
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#include <string.h>
#import "OFHTTPRequest.h"
#import "OFString.h"
#import "OFURL.h"
#import "OFDictionary.h"
#import "OFData.h"
#import "OFArray.h"
#import "OFInvalidFormatException.h"
#import "OFOutOfRangeException.h"
#import "OFUnsupportedVersionException.h"
const char *
|
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
|
encoding: OF_STRING_ENCODING_UTF_8];
}
- (void)setBodyFromString: (OFString *)string
encoding: (of_string_encoding_t)encoding
{
void *pool = objc_autoreleasePoolPush();
OFDataArray *body = [OFDataArray dataArray];
[body addItems: [string cStringWithEncoding: encoding]
count: [string cStringLengthWithEncoding: encoding]];
[self setBody: body];
objc_autoreleasePoolPop(pool);
}
- (OFString *)description
{
void *pool = objc_autoreleasePoolPush();
|
<
>
|
|
<
|
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
|
encoding: OF_STRING_ENCODING_UTF_8];
}
- (void)setBodyFromString: (OFString *)string
encoding: (of_string_encoding_t)encoding
{
void *pool = objc_autoreleasePoolPush();
[self setBody: [OFData
dataWithItems: [string cStringWithEncoding: encoding]
count: [string cStringLengthWithEncoding: encoding]]];
objc_autoreleasePoolPop(pool);
}
- (OFString *)description
{
void *pool = objc_autoreleasePoolPush();
|