From 5be0a13a0e871e8c0d3e7cd8bea90c2d028e482f Mon Sep 17 00:00:00 2001 From: Teddy Newell Date: Wed, 9 Mar 2016 22:12:56 -0800 Subject: [PATCH 1/2] Fixed failing HTTP request when synthesizing TextToSpeech by removing 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](https://github.com/tristanhimmelman/AlamofireObjectMapper/issues/63) without introducing any API changes. - Uses `~>` for maximum compatibility in the dependency graph --- Cartfile | 2 +- Cartfile.resolved | 2 +- WatsonDeveloperCloud/TextToSpeech/TextToSpeech.swift | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Cartfile b/Cartfile index 8e05f40cc..d254908bf 100644 --- a/Cartfile +++ b/Cartfile @@ -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 \ No newline at end of file +github "tristanhimmelman/AlamofireObjectMapper" ~> 2.1.1 \ No newline at end of file diff --git a/Cartfile.resolved b/Cartfile.resolved index b80ef88c7..fcc5ee924 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -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" \ No newline at end of file diff --git a/WatsonDeveloperCloud/TextToSpeech/TextToSpeech.swift b/WatsonDeveloperCloud/TextToSpeech/TextToSpeech.swift index cbea7921b..872f04501 100644 --- a/WatsonDeveloperCloud/TextToSpeech/TextToSpeech.swift +++ b/WatsonDeveloperCloud/TextToSpeech/TextToSpeech.swift @@ -87,7 +87,6 @@ public class TextToSpeech: WatsonService { endpoint: Constants.synthesize, authStrategy: authStrategy, accept: .OPUS, - contentType: .JSON, urlParams: urlParams) // execute request From 76a68cd4e3efe4cc6ae007f3ad1bc74d3e5898b3 Mon Sep 17 00:00:00 2001 From: Teddy Newell Date: Thu, 10 Mar 2016 13:20:37 -0800 Subject: [PATCH 2/2] Reverses changes to AlamofireObjectMapper version Reverses changes to AlamofireObjectMapper version in `Cartfile` and `Cartfile.resolved` to keep this PR to-the-point. --- Cartfile | 2 +- Cartfile.resolved | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cartfile b/Cartfile index d254908bf..8e05f40cc 100644 --- a/Cartfile +++ b/Cartfile @@ -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.1 \ No newline at end of file +github "tristanhimmelman/AlamofireObjectMapper" == 2.1.0 \ No newline at end of file diff --git a/Cartfile.resolved b/Cartfile.resolved index fcc5ee924..b80ef88c7 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -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.3" \ No newline at end of file +github "tristanhimmelman/AlamofireObjectMapper" "2.1.0"