zoukankan      html  css  js  c++  java
  • 怎么自行HTTP的POST包头,需要使用json

    http://bbs.csdn.net/topics/390674431

    不理解你为什么这么传 post的格式如下:
    POST / HTTP/1.1
    Host: www.wrox.com
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6)
    Gecko/20050225 Firefox/1.0.1
    Content-Type: application/x-www-form-urlencoded
    Content-Length: 40
    Connection: Keep-Alive
         (----此处空一行----)
    name=Professional%20Ajax&publisher=Wiley
    实例:
    POST /DEMOWebServices2.8/Service.asmx/CancelOrder HTTP/1.1
    Host: api.efxnow.com
    Content-Type: application/x-www-form-urlencoded
    Content-Length: length

    UserID=string&PWD=string&OrderConfirmation=string
    post不支持太复杂的格式 可以考虑soap 示例如下:
    POST /DEMOWebServices2.8/Service.asmx HTTP/1.1
    Host: api.efxnow.com
    Content-Type: application/soap+xml; charset=utf-8
    Content-Length: length

    <?xml version="1.0" encoding="utf-8"?>
    <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

    xmlns:xsd="http://www.w3.org/2001/XMLSchema"

    xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
    <soap12:Body>
        <CancelOrder xmlns="https://api.efxnow.com/webservices2.3">
          <UserID>string</UserID>
          <PWD>string</PWD>
          <OrderConfirmation>string</OrderConfirmation>
        </CancelOrder>
    </soap12:Body>
    </soap12:Envelope>

  • 相关阅读:
    开启mysql的远程访问权限
    react生命周期
    代码分析工具-SonarQube的安装及使用
    数据源连接神器-DBeaver
    内网搭建pip镜像源
    MySQL5.6源码包安装
    Oracle11g 离线静默安装并附安装脚本
    如何上手DataX
    RockeMQ集群部署
    Redis集群搭建
  • 原文地址:https://www.cnblogs.com/zkwarrior/p/7909575.html
Copyright © 2011-2022 走看看