Skip to content

Commit ab88d96

Browse files
committed
Merge pull request nxtbgthng#68 from hwaxxer/number-support
Supports adding parts with NSNumber.
2 parents 9e10348 + 6c3fa49 commit ab88d96

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Sources/OAuth2Client/NXOAuth2PostBodyPart.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ - (id)initWithName:(NSString *)name content:(id)content;
3636
{
3737
if ([content isKindOfClass:[NSString class]]) {
3838
return [self initWithName:name stringContent:content];
39+
} else if ([content isKindOfClass:[NSNumber class]]) {
40+
return [self initWithName:name stringContent:[content stringValue]];
3941
} else if ([content isKindOfClass:[NSURL class]] && [content isFileURL]) {
4042
return [self initWithName:name fileContent:[content path]];
4143
} else if ([content isKindOfClass:[NSData class]]) {

0 commit comments

Comments
 (0)