web request - how to authorize

 

Hi,


I'm familiar with python and using code such as the following to post some information to an api:


response = requests.post(url, json=dict_data, headers=headersauth=HTTPBasicAuth(C_API_UNAME, C_API_PWD))


I wasn't sure how to authorise (ie HTTPBasicAuth above) using MQL5 WebRequest.   Do you have an example of how I could do this.


https://www.mql5.com/en/docs/network/webrequest


Thanks

Documentation on MQL5: Network Functions / WebRequest
Documentation on MQL5: Network Functions / WebRequest
  • www.mql5.com
WebRequest - Network Functions - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5