mIRC Home    About    Download    Register    News    Help

Print Thread
#72397 22/02/04 08:11 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
OP Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
before anyone starts saying "we don't help with MSN!, etc etc", it's for msn messenger, not chat.
anyway.. the problem is, i thought Microsoft.XMLHTTP was exactly the same as WinHttp.WinHttpRequest.5.1 to use, but when i change WinHttp.WinHttpRequest.5.1 to Microsoft.XMLHTTP, i get no response.
it works fine with WinHttp.WinHttpRequest.5.1 though.
does anyone know why this won't work with Microsoft.XMLHTTP?
Code:
alias msn.ticket { 
  var %a msn.ticket
  if $com(%a) { .comclose %a }
  .comopen %a WinHttp.WinHttpRequest.5.1
  if $comerr { return }
  if !$com(%a,Open,1,bstr,GET,bstr,$1) { return }
  if !$com(%a,SetRequestHeader,1,bstr,Authorization,bstr,$3-) { return }
  if !$com(%a,SetRequestHeader,1,bstr,Host,bstr,$2) { return }
  if !$com(%a,Send,1) { return }
/*
it only gets to here with Microsoft.XMLHTTP
*/
  echo -s GOT TO
  if $com(%a,GetResponseHeader,1,bstr,authentication-info) { echo -s GOT TO }
}


New username: hixxy
#72398 23/02/04 01:30 AM
Joined: Dec 2003
Posts: 219
F
Fjord artisan
Offline
Fjord artisan
F
Joined: Dec 2003
Posts: 219
Hi!

Try using getAllResponseHeaders or responseText instead of GetResponseHeader

#72399 23/02/04 07:43 AM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
OP Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
tried GetAllResponseHeaders before i posted, i should of added that crazy
anyway, it doesn't respond with any headers at all using Microsoft.XMLHTTP, but it's fine using WinHttp.WinHttpRequest.5.1


New username: hixxy
#72400 23/02/04 08:40 PM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
$com(%a,Open,1,bstr,GET,bstr,$1,bool,false)

  • open(bstrMethod, bstrUrl, varAsync, bstrUser, bstrPassword).
    ...
    varAsync [optional]
    Boolean. Indicator of whether the call is asynchronous. The default is True (the call returns immediately).
http://msdn.microsoft.com/library/defaul...httprequest.asp

#72401 23/02/04 08:57 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
OP Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
thanks smile


New username: hixxy

Link Copied to Clipboard