Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/json/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 如何使用Swift Alamofire在REST API中发送HTML标记字符串?_Ios_Json_Swift_Swift3_Swift4 - Fatal编程技术网

Ios 如何使用Swift Alamofire在REST API中发送HTML标记字符串?

Ios 如何使用Swift Alamofire在REST API中发送HTML标记字符串?,ios,json,swift,swift3,swift4,Ios,Json,Swift,Swift3,Swift4,我需要发送HTML字符串到服务器。 我正在使用Swift-alamofire,当我尝试调用restapi,然后从服务器获得ccs代码响应时。 和《邮递员》中使用的身体格式一样,效果很好 我的请求正文参数: {body = "<br/><br/>Hi Bhavdip,<br/><br/>Please find the One-Time Password (OTP) as requested through application.<br/>

我需要发送HTML字符串到服务器。 我正在使用Swift-alamofire,当我尝试调用restapi,然后从服务器获得ccs代码响应时。 和《邮递员》中使用的身体格式一样,效果很好

我的请求正文参数:

{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";}
{body=“

Hi Bhavdip,

请根据应用程序的要求查找一次性密码(OTP)。
OTP-123456


请在您的移动应用程序中输入此OTP,以验证您的帐户并更改电话号码。

“用于帐户验证的VeriDoc全局OTP”;toaddress=“bambhroliya。bhavdip@example.com“toname=“Bhavdip Patel”}
答复:

json格式无效。正在获取css代码。 参数值为




您好,Bhavdip,

请根据应用程序的要求查找一次性密码(OTP)。
OTP-123456


请在您的移动应用程序中输入此OTP,以验证您的帐户并更改电话号码。

让params=[body=“

你好,Bhavdip,

请通过应用程序查找一次性密码(OTP)。
OTP-798580


请在您的移动应用程序中输入此OTP,以验证您的帐户并更改电话号码。


用于账户验证的VeriDoc全球OTP”,toaddress=“bambhroliya。bhavdip@tristonsoft.com,toname=“Bhavdip Patel”]as![字符串:任意]
将其用作参数“我的请求正文参数:”你能展示一些你是如何得到它的代码吗?还有,为什么它看起来像是一个
NSDictionary
,而不是一个Swift字典?
"<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."