找回密码
 立即注册

QQ登录

只需一步,快速开始

maoyufeng1985

注册会员

6

主题

32

帖子

118

积分

注册会员

积分
118
maoyufeng1985
注册会员   /  发表于:2020-12-21 15:35  /   查看:1817  /  回复:1
1金币
我在服务端新建一个html文件,
<hmtl>
    <body>
        <form method="post" action="http://localhost:22345/UserService/Manager/Role/AddRole">
            <input type="text" name="RoleName" id="RoleName"/>
            <input type="submit" />
        </form>
    </body>
</hmtl>

用浏览器打开,提交后返回错误Status Code:
415 Unsupported Media Type




    • Request URL:
      http://localhost:22345/UserService/Manager/Role/AddRole
    • Request Method:
      POST
    • Status Code:
      415 Unsupported Media Type
    • Remote Address:
      [::1]:22345
    • Referrer Policy:
      strict-origin-when-cross-origin

  • Response Headersview source
    • Content-Length:
      0
    • Date:
      Mon, 21 Dec 2020 07:33:27 GMT
    • Server:
      Microsoft-HTTPAPI/2.0

  • Request Headersview source
    • Accept:
      text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
    • Accept-Encoding:
      gzip, deflate, br
    • Accept-Language:
      zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6
    • Cache-Control:
      max-age=0
    • Connection:
      keep-alive
    • Content-Length:
      16
    • Content-Type:
      application/x-www-form-urlencoded
    • Host:
      localhost:22345
    • Origin:
      null
    • Sec-Fetch-Dest:
      document
    • Sec-Fetch-Mode:
      navigate
    • Sec-Fetch-Site:
      cross-site
    • Sec-Fetch-User:
      ?1
    • Upgrade-Insecure-Requests:
      1
    • User-Agent:
      Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36 Edg/87.0.664.66

  • Form Dataview sourceview URL encoded
    • RoleName:
      newrole


最佳答案

查看完整内容

您好,可以参考下这篇帖子中的方式调用哈: 外部程序如何调用活字格服务器接口 https://gcdn.grapecity.com.cn/forum.php?mod=viewthread&tid=82972&fromuid=58155 (出处: 葡萄城产品技术社区)

1 个回复

倒序浏览
最佳答案
最佳答案
Erik.Xue讲师达人认证 悬赏达人认证 活字格认证 Wyn认证
超级版主   /  发表于:2020-12-21 15:35:24
来自 2#
您好,可以参考下这篇帖子中的方式调用哈:

外部程序如何调用活字格服务器接口
https://gcdn.grapecity.com.cn/fo ... 2&fromuid=58155
(出处: 葡萄城产品技术社区)
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部