Hello I want to send a request using Kurl to follow the link (externally the link looks like
<a id="ctl00_plhMain_lnkSchApp" class="purplelink" href="javascript:__doPostBack('ctl00$plhMain$lnkSchApp','')">Далее</a>
I pass a post request:
curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS,'некий пост-текст').
All the request data that is sent is taken from firebug, it clearly states that this is a post method. But as a result, the server returns
HTTP / 1.1 405 Method Not Allowed
Allow: OPTIONS, TRACE, GET, HEAD
Content-Length: 1564 Content-Type: text / html
Server: Microsoft-IIS / 6.0 X-Powered-By: ASP.NET
Date: Thu, 01 Sep 2016 16:45:55 GMT
that is, the POST method is not allowed. I can not understand what the problem is: either I do not correctly set the request, or indeed the method is not needed here, maybe there is another way to follow the link?
Allow
header explicitly says that only queries with optionsOPTIONS
,TRACE
,GET
,HEAD
are expected. - Nofate ♦