Skip to content

Commit

Permalink
Add default responseData
Browse files Browse the repository at this point in the history
Add default responseData so that empty response bodies like for status code 204 don't result in UNIHTTPClientHelper.m returning a nil UNIHTTPResponse
  • Loading branch information
ailiao committed Jun 15, 2015
1 parent dbeddb5 commit d5c2817
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Unirest/UNIUrlConnection.m
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ + (UNIUrlConnection *)sendAsynchronousRequest:(NSURLRequest *)request queue:(NSO
result.request = request;
result.queue = queue;
result.completionHandler = completionHandler;
result->responseData = [NSMutableData data];
[result start];
return result;
}
Expand Down

0 comments on commit d5c2817

Please sign in to comment.