[英]How can I send HTML tag string in REST API by using Swift Alamofire?
I need to send HTML string to server. 我需要将HTML字符串发送到服务器。 I am using Swift alamofire and when I try to call Rest api then getting ccs code response from server. 我正在使用Swift alamofire,当我尝试调用Rest api时,会从服务器获取ccs代码响应。 same body format used in PostMan and it's working good. 与PostMan中使用的正文格式相同,并且效果很好。
My request body parameters: 我的请求正文参数:
{body = "<br/><br/>Hi Bhavdip,<br/><br/>Please find the One-Time Password (OTP) as requested through application.<br/>OTP- 123456 <br/><br/>Kindly, enter this OTP in your mobile application to authenticate your account and change phone number.<br/><br/>Kind regard,<br/>VeriDoc Global Team.";subject = "VeriDoc Global OTP for Account Verification";toaddress = "bambhroliya.bhavdip@example.com"; toname = "Bhavdip Patel";}
Response: 响应:
invalid json format. 无效的json格式。 getting css code. 获取CSS代码。 Param Value is 现“参数值”为
"<br/><br/>Hi Bhavdip,<br/><br/>Please find the One-Time Password (OTP) as requested through application.<br/>OTP- 123456 <br/><br/>Kindly, enter this OTP in your mobile application to authenticate your account and change phone number.<br/><br/>Kind regard,<br/>VeriDoc Global Team."
let params = [body = "<br/><br/>Hi Bhavdip,<br/><br/>Please find the One-Time Password (OTP) as requested through application.<br/>OTP- 798580 <br/><br/>Kindly, enter this OTP in your mobile application to authenticate your account and change phone number.<br/><br/>Kind regard,<br/>VeriDoc Global Team.",subject = "VeriDoc Global OTP for Account Verification",toaddress = "bambhroliya.bhavdip@tristonsoft.com", toname = "Bhavdip Patel"] as! [String:Any]
用它作为你的参数
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.