我在服务端新建一个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
|