basic access authentication
Posted: Tue Jul 28, 2020 10:56 pm
Dear community,
I am not familiar with basic access authentication.
Ist there a way to post an XML with basic access authentication?
I have tried this code, but I think it is just nonsense....
I am thankfull for your help.
Kind regards
Iris
I am not familiar with basic access authentication.
Ist there a way to post an XML with basic access authentication?
I have tried this code, but I think it is just nonsense....
Code: Select all
loHyperlink := CreateObject( 'Microsoft.XMLHTTP' )
cHttpSend := [{ "user": ]+hb_base64Encode(alltrim(cHotelCode)+":")+[, "password": ]+hb_base64Encode(alltrim( cMsgPassword ))+[}]
loHyperlink:Open( "POST" ,cUrl, .F. )
loHyperlink:SetRequestHeader( "Accept" , "application/json" )
loHyperlink:SetRequestHeader( "Content-Type" , "application/json" )
loHyperlink:SetRequestHeader( "Authorization" , cHttpSend )
loHyperlink:Send( cXML )
Kind regards
Iris