Livecode httpHeader

Livecode httpHeader

有人可以指导我发送下面的 httpHeaders 的适当方式吗?从服务器收到 "Permission Denied" 的响应,但我的代码看起来一切正常。

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"

每个 header 字段应单独一行,因此您应在每个 key-value:

之间添加一个 return
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"