mIRC Homepage
Posted By: Dazuz $urlget and 4XX status codes - 21/03/20 01:28 PM
$urlget ignores 4XX status code response bodies.

https://www.mirc.com/helloworld
Code
//noop $urlget(https://www.mirc.com/helloworld,gb,&test,responsebodytest)

alias responsebodytest {
  echo -a state: $urlget($1).state
  echo -a size: $urlget($1).size
  echo -a reply: $urlget($1).reply
  if ($bvar(&test,0)) echo -s response: $bvar(&test,1-).text
  else echo -a response: $!null
}
Posted By: Khaled Re: $urlget and 4XX status codes - 21/03/20 02:52 PM
Thanks for your bug report. That is correct. If a connection fails, mIRC will return the error in the state and reply properties and will not save the html error reply to a file or a binvar.
Posted By: Dazuz Re: $urlget and 4XX status codes - 21/03/20 03:51 PM
Any chance you could add an option to save the reply? It would be nice to be able to see the error replies.
© mIRC Discussion Forums