Skip to content

Commit 1df8715

Browse files
author
Evadne Wu
committed
ObjC | revises IRWebAPIKit.h and adds mutating context key IRWebAPIEngineHTTPPostParameters
1 parent 577cb09 commit 1df8715

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

‎IRWebAPIKit.h‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,20 @@ typedef void (^IRWebAPIEngineExecutionBlock) (void);
4343
#define kIRWebAPIEngineRequestHTTPHeaderFields @"IRWebAPIEngineHTTPHeaderFields"
4444
// Expected to be a dictionary
4545

46+
#define kIRWebAPIEngineRequestHTTPPOSTParameters @"IRWebAPIEngineRequestHTTPPOSTParameters"
47+
// Expected to be a dictionary, that contains NSString / NSData objects. Everything is in utf-8 or octet.
48+
// If not blank, IRWebAPIEngine makes the HTTP body from the parameters.
49+
// Notice that to use POST parameters, a new transformer block that grabs the correct stuff under this key from the context and adds it to the
50+
4651
#define kIRWebAPIEngineRequestHTTPBody @"IRWebAPIEngineHTTPBody"
47-
// Expected to be NSData or nil
52+
// Expected to be NSData, or [NSNull null] for custom HTTP body handling.
53+
// If used with IRWebAPIEngineRequestHTTPPOSTParameters, an exception will be thrown.
4854

4955
#define kIRWebAPIEngineRequestHTTPQueryParameters @"IRWebAPIEngineHTTPQueryParameters"
5056
// Expected to be a dictionary
5157

5258
#define kIRWebAPIEngineRequestHTTPMethod @"IRWebAPIEngineRequestHTTPMethod"
53-
// Expected to be POST, GET, whatever
59+
// Expected to be POST, GET, whatever. Must be POST if IRWebAPIEngineHTTPPOSTParameters is defined.
5460

5561
#define kIRWebAPIEngineParser @"IRWebAPIEngineParser"
5662
// Expected to be a IRWebAPIResponseParser. Exposed to allow custom response parsing for “some methods”.

0 commit comments

Comments
 (0)