mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2015
Posts: 148
Dazuz Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Dec 2015
Posts: 148
$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
}

Joined: Dec 2002
Posts: 5,412
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,412
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.

Joined: Dec 2015
Posts: 148
Dazuz Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Dec 2015
Posts: 148
Any chance you could add an option to save the reply? It would be nice to be able to see the error replies.


Link Copied to Clipboard