Skip to content

Commit

Permalink
Fixed failing HTTP request when synthesizing TextToSpeech by removing…
Browse files Browse the repository at this point in the history
… unneeded content-type header

- Fixed the failing HTTP request in `TextToSpeech().synthesize(_:voice:completionHandler)` by removing the unneeded JSON content-type header. Since no HTTP message is included in the request body, the content-type is superfluous.
  - Note that an extraneous content-type probably shouldn't cause a 400 response when the request body is empty for a GET request.

- Updated AlamofireObjectMapper version for Carthage compatibility and to fix [Carthage build error due to deployment targets](tristanhimmelman/AlamofireObjectMapper#63) without introducing any API changes.
  - Uses `~>` for maximum compatibility in the dependency graph
  • Loading branch information
Teddy Newell committed Mar 10, 2016
1 parent e599f60 commit 5be0a13
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cartfile
Expand Up @@ -3,4 +3,4 @@ github "DaveWoodCom/XCGLogger" == 3.1.1
github "Hearst-DD/ObjectMapper" == 1.0.1
github "rhodgkins/SwiftHTTPStatusCodes" == 2.0.1
github "daltoniam/Starscream" == 1.0.2
github "tristanhimmelman/AlamofireObjectMapper" == 2.1.0
github "tristanhimmelman/AlamofireObjectMapper" ~> 2.1.1
2 changes: 1 addition & 1 deletion Cartfile.resolved
Expand Up @@ -3,4 +3,4 @@ github "Hearst-DD/ObjectMapper" "1.0.1"
github "daltoniam/Starscream" "1.0.2"
github "rhodgkins/SwiftHTTPStatusCodes" "2.0.1"
github "DaveWoodCom/XCGLogger" "Version_3.1.1"
github "tristanhimmelman/AlamofireObjectMapper" "2.1.0"
github "tristanhimmelman/AlamofireObjectMapper" "2.1.3"
1 change: 0 additions & 1 deletion WatsonDeveloperCloud/TextToSpeech/TextToSpeech.swift
Expand Up @@ -87,7 +87,6 @@ public class TextToSpeech: WatsonService {
endpoint: Constants.synthesize,
authStrategy: authStrategy,
accept: .OPUS,
contentType: .JSON,
urlParams: urlParams)

// execute request
Expand Down

0 comments on commit 5be0a13

Please sign in to comment.