有人能指导我发送下面的httpHeaders的适当方法吗?我从服务器得到了“拒绝许可”的响应,但是我的代码看起来都不错。
put "ABCD" into clientId
put "1234" into clientSecret
put "Authorization: Basic" && base64Encode("clientId:clientSecret") && "Content-Type: application/json"&& "Cache-Control: no-cache" into tHeader
set the httpHeaders to tHeader
post receiveMomoRequest to url "https://server/v1/merchantaccount/merchants/HMXXXXXX/receive"发布于 2018-04-05 14:38:18
每个标头字段应该位于单独的行上,因此您应该在每个键值之间添加一个返回:
put "ABCD" into clientId
put "1234" into clientSecret
put "Authorization: Basic" && base64Encode("clientId:clientSecret") & return & "Content-Type: application/json" & return & "Cache-Control: no-cache" into tHeader
set the httpHeaders to tHeader
post receiveMomoRequest to url "https://server/v1/merchantaccount/merchants/HMXXXXXX/receive"https://stackoverflow.com/questions/49663426
复制相似问题