Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
jasl committed Apr 26, 2016
1 parent 604167f commit 795b057
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ struct GithubShowUser: Target {
return [:]
}

// Optional, default is .URL, means submit parameters using `x-www-form-urlencoded`
// Optional, default is .URL, means submitting parameters using `x-www-form-urlencoded`
var parameterEncoding: ParameterEncoding {
return .URL
}
Expand All @@ -118,7 +118,7 @@ provider.request(GithubShowUser(name: "jasl")) { response in
let statusCode = response.statusCode
// Handle success here

// Network failure (connectivity or timeout), the request had cancelled or aborted or other unexpect errors goes here
// Network failure (connectivity or timeout), the request had cancelled or other unexpected errors goes here
case let .Incomplete(error):
// error is an enum
// Handle error here
Expand All @@ -143,7 +143,7 @@ struct UploadingTarget: Target {

var parameters: [String: AnyObject] {
return [
// MoyaX provides some placeholders for MultipartFormdata
// MoyaX provides some placeholders for MultipartFormData
"photo1": FileForMultipartFormData(fileURL: photoFileURL, filename: 'photo1.jpg', mimeType: 'image/jpeg'),
"photo2": DataForMultipartFormData(data: photoData, filename: 'photo2.jpg', mimeType: 'image/jpeg')
}
Expand Down
4 changes: 2 additions & 2 deletions Sources/Error.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import Foundation
/**
Errors on requesting a target.

- BackendBuildingRequest: Raised on making request object. e.g raised by serializing multipart failure
- BackendResponse: Raised on backend's completion of a request. e.g raised by request timeout
- BackendBuildRequest: Raised on making request object. e.g serializing multipart form data failure
- BackendResponse: Raised on backend's completion of a request. e.g timeout
- BackendUnexpect: All other errors raised by backend
- Cancelled: Raised by `cancellableToken.cancel()`
= Underlying: Uncategoried errors
Expand Down

0 comments on commit 795b057

Please sign in to comment.