-2
是否可以通过Alomofire会话管理器发送加密字符串编码为Base64?我发现的只是传递参数来请求。我想自己设置http请求正文。是否可以使用Alomofire发送加密base64字符串
是否可以通过Alomofire会话管理器发送加密字符串编码为Base64?我发现的只是传递参数来请求。我想自己设置http请求正文。是否可以使用Alomofire发送加密base64字符串
let fullBase64String = "data:image/png;base64,\(dataImage))"
,然后添加 “fullBase64String” 你的参数
let parameter = ["product_img": "\(fullBase64String)"]
headers = ["Content-Type": "application/json","Authorization" : "Token \(token!)"]
Alamofire.request(url, method: .post, parameters: parameter, encoding: JSONEncoding.default, headers: headers).responseJSON { response in
print(response.request)
print(response.response)
print(response.result)
print(response.result.value)
}
}
}
这不是我所需要的。我已经加密了JSON,所以我不能在请求中使用键值对。 –