如何在我的iOS应用程序中使用Alamofire发送带有简单字符串的POST请求?
作为默认设置,Alamofire需要请求参数:
Alamofire.request(.POST, "http://mywebsite.example/post-request", parameters: ["foo": "bar"])
这些参数包含键值对。但我不想在HTTP主体中发送键值字符串。
我的意思是这样的:
Alamofire.request(.POST, "http://mywebsite.example/post-request", body: "myBodyString")