【问题标题】:How to send object data in URL?如何在 URL 中发送对象数据?
【发布时间】:2015-10-08 09:56:31
【问题描述】:

我有一个客户网址。他们被要求我将所有数据发送到一个对象中以插入他们的数据库。

如何在一个对象中发送这么多字段数据?

示例网址:

http://example.com/Order/Insert/{MerchantId}/{Secretkey}/{Relationcode}{object data}

我有 {MerchantId}、{Secretkey}、{Relationcode} 和 {object data}。

对象数据包含以下字段:

OrderNo、LoginId、shipCharge、CompanyDiscount、totalMRP、totalquantity 等

如何将所有这些数据作为对象数据发送?

请给我一些好的方法。

【问题讨论】:

标签: php object url post get


【解决方案1】:

我会在 URL 中发送 JSON,但对其进行编码以使其看起来更专业,可能使用 base64_encode()

【讨论】:

  • 在 URL 中将编码的 JSON 作为 RouterParams 发送是一种好习惯吗?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-04-27
  • 1970-01-01
  • 2014-10-05
  • 2019-03-29
  • 1970-01-01
  • 2020-08-03
相关资源
最近更新 更多