Main Board > Web Services

*plus/web/request with Proxy server

(1/1)

Mark Brown:
Are there any plans to enhance *plus/web/request to work with a proxy server that requires a PEM file, username and password?

It would act similar to this curl command with JSON data:
curl <destination url> --cacert <filepath of PEM file> -x https://<username>:<password>@<proxy server url> -H "Content-Type: application/json" -d "<json data>"

Thanks
Mark Brown

Bruno Biancucci:
I'm by no means an expert on the matter, but I do use request program all the time.  For the most part in stock form, it does a good job.  You can open this program and adjust it or a copy.  I had a case where I had to pull images from a remote site and request didn't quite work right with the expected payload, so I made a very small adjustment to the code and it's been flawless.  In another case, I wanted more details like timing and raw data being sent/received, so I added a log file; which turned out to be very help full.
I'm not sure about proxy details, but if this information needs to be included in the HTTP header, check out the "extrahdrs$" field.  I have to use this from time to time if certain credentials need to be passed to the server.

Mike King:
For Windows you can often simply replace the call to *plus/web/request with a call to *wininet. 
The calling parameters a basically the same:

   url$, postdata$, response$, header$, mimetype$, extraheaders$

It will use the Windows proxy settings.

Navigation

[0] Message Index

Go to full version