直接點擊網站的鏈接可以通過瀏覽器獲取json資料
http://47.89.26.120/info/block/findBlocksByPage.do?page=1&rows=15
但是我通過自己發送命令的方式
POST /info/block/findBlocksByPage.do?page=1&rows=15 HTTP/1.1
Host: 47.89.26.120
Content-Type: application/json
Content-Length: 38
Connection: close
Accept: application/json
{
"page" : "1",
"rows" : "15"
}
老是這個問題:
HTTP/1.1 403 Forbidden
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=C619406506E206226EDD8D55DC8FCBC1; Path=/; HttpOnly
Content-Type: text/html;charset=utf-8
Content-Language: en
Content-Length: 1116
Date: Tue, 02 Aug 2016 06:06:52 GMT
Connection: close
<!DOCTYPE html><html><head><title>Apache Tomcat/8.0.36 - Error report</title><style type="text/css">H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}.line {height: 1px; background-color: #525D76; border: none;}</style> </head><body><h1>HTTP Status 403 - Expected CSRF token not found. Has your session expired?</h1><div class="line"></div><p><b>type</b> Status report</p><p><b>message</b> <u>Expected CSRF token not found. Has your session expired?</u></p><p><b>description</b> <u>Access to the specified resource has been forbidden.</u></p><hr class="line"><h3>Apache Tomcat/8.0.36</h3></body></html>
uj5u.com熱心網友回復:
禁止訪問了啊。用瀏覽器直接能訪問,那就用GET方式,別用POSTuj5u.com熱心網友回復:
直接在瀏覽器訪問http://47.89.26.120/info/block/findBlocksByPage.do?page=1&rows=15是GET請求吧,你發的是POST請求。
uj5u.com熱心網友回復:
get和post明顯沒有分清。。。轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/129731.html
標籤:網絡編程
上一篇:關于DLL注入問題!
