Swift2 在\“中给出的期望值;期望\“;无法满足请求标头()

Swift2 在\“中给出的期望值;期望\“;无法满足请求标头(),swift2,ios9,xcode7,alamofire,Swift2,Ios9,Xcode7,Alamofire,这是我的代码块,我不断收到错误errorDomain=nsCoCaerorDomain code=3840“字符0周围的无效值”。当我尝试responseString而不是responseJSON时,我收到错误“无法满足\“Expect\”请求标头()中给出的期望” 所以我认为问题在于Expect头100 continue头。有人知道如何在iOS中禁用它吗?100 Continue是HTTP固有的一部分,如果您没有在HTTP 1.0上运行,则无法禁用它。我如何切换到HTTP 1.0?你能为我的上

这是我的代码块,我不断收到错误errorDomain=nsCoCaerorDomain code=3840“字符0周围的无效值”。当我尝试responseString而不是responseJSON时,我收到错误“无法满足\“Expect\”请求标头()中给出的期望”


所以我认为问题在于Expect头100 continue头。有人知道如何在iOS中禁用它吗?
100 Continue
是HTTP固有的一部分,如果您没有在HTTP 1.0上运行,则无法禁用它。我如何切换到HTTP 1.0?你能为我的上述问题提供任何其他解决方案吗?问题要么在服务器实现中,要么在Alamofire库中。库中的问题类似于?我不明白。几个小时以来我一直在尝试修复它:(
let parameter = ["mobileNumber":number]
let header = ["accessToken" : newToken,"Content-Type":"Application/JSON"]
let url1 = NSURL(string: baseUrl + registerMobileUrl)
Alamofire
.request(.POST, url1!, parameters: parameter, encoding: ParameterEncoding.JSON, headers : header)
.responseString { response in
print("All header fields are (response.response?.allHeaderFields)")
print("the response main of register mobile is (response)")