Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

ERROR: -[FSNConnection makePostBodyWithBoundary:]: skipping bad POST parameter value: key: testsArray; value class: __NSArrayM; value: #9

Closed
antonioparisi opened this Issue · 3 comments

2 participants

@antonioparisi

Send NSArray/NSMutableArray as parameters as well, not just NSString or NSNumber or FSNData, thanks for that guys.

@gwk
gwk commented

How do you propose arrays should be serialized to the POST data?

@antonioparisi

Just looking into AFNetworking module, under AFHTTPClient implementation:
NSArray *array = value;
[array enumerateObjectsUsingBlock:^(id nestedValue, __unused NSUInteger idx, __unused BOOL *stop) {
[mutableQueryStringComponents addObjectsFromArray:AFQueryStringPairsFromKeyAndValue([NSString stringWithFormat:@"%@[]", key], nestedValue)];
}];

Basically something like that.

@gwk

Is this a convention introduced by Rails? (I think I may have read about it somewhere once but I'm not sure). I don't have a lot of interest in implementing non-standard behavior, but I'm open to suggestions. How much of a problem is this for you really? It seems like you could format your keys and values before passing them into FSNConnection without much difficulty; the FSN API is designed with the idea that most application code will want some sort of wrapper constructor to handle commonalities across all API requests. Again, always happy to hear about new use cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.