Optimize request header #116

Merged
merged 3 commits into from Dec 17, 2015

Conversation

Projects
None yet
2 participants
@chuganzy
Contributor

chuganzy commented Dec 16, 2015

No description provided.

@chuganzy

View changes

APIKit/Session.swift
- handler(.Failure(error))
+ dispatch_async(dispatch_get_main_queue(), { () -> Void in
+ handler(.Failure(error))
+ })

This comment has been minimized.

@ishkawa

ishkawa Dec 16, 2015

Owner

We prefer the following style:

dispatch_async(dispatch_get_main_queue()) {
    .Failure(error)
}
@ishkawa

ishkawa Dec 16, 2015

Owner

We prefer the following style:

dispatch_async(dispatch_get_main_queue()) {
    .Failure(error)
}

This comment has been minimized.

@chuganzy

chuganzy Dec 17, 2015

Contributor

@ishkawa OK, and I've fixed it.

@chuganzy

chuganzy Dec 17, 2015

Contributor

@ishkawa OK, and I've fixed it.

@chuganzy chuganzy changed the title from Modify request header to Optimize request header Dec 16, 2015

@@ -101,6 +101,7 @@ public extension RequestType {
default:
do {
URLRequest.HTTPBody = try requestBodyBuilder.buildBodyFromObject(parameters)
+ URLRequest.setValue(requestBodyBuilder.contentTypeHeader, forHTTPHeaderField: "Content-Type")

This comment has been minimized.

@ishkawa

ishkawa Dec 16, 2015

Owner

👍

@ishkawa

This comment has been minimized.

Show comment
Hide comment
@ishkawa

ishkawa Dec 16, 2015

Owner

Except for 1 note, looks good

Owner

ishkawa commented Dec 16, 2015

Except for 1 note, looks good

@ishkawa

This comment has been minimized.

Show comment
Hide comment
@ishkawa

ishkawa Dec 17, 2015

Owner

All changes make sense. Thank you for the pull request!

Owner

ishkawa commented Dec 17, 2015

All changes make sense. Thank you for the pull request!

ishkawa added a commit that referenced this pull request Dec 17, 2015

@ishkawa ishkawa merged commit 1d1a618 into ishkawa:master Dec 17, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@chuganzy

This comment has been minimized.

Show comment
Hide comment
@chuganzy

chuganzy Dec 17, 2015

Contributor

🍺

Contributor

chuganzy commented Dec 17, 2015

🍺

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment