Many years ago, I needed a way to send POST requests via HTTPS in order to interact with APIs such as Authorize.Net and UPS Online Tools, among others, from my Classic ASP pages.
I found a Windows server component (DLL) called KHTTP that would send out the requests and put the results into an ASP variable. It worked with HTTP and HTTPS, as well as regular POST and XML data, could pull in the content from any external URL (even if not POSTing data), and I have used it with a variety of APIs (and for other purposes) over the years. The component seems to be out-of-date at this point, although I still use it for many websites since it works well at what it does:
However, at the moment, I am trying to do HTTPS POST requests to one of the PayPal APIs. KHTTP does not seem to be working, because (I am told by PayPal tech support) it is likely the component is making my data urlencoded.
I'm a little confused by that, because I have used it successfully with many other APIs… notable ones too, such as the aforementioned Authorize.Net and UPS Online Tools. I don't know why their requirements for a POST request would be different from PayPal's.
I even setup my own listener, received my own POST, and the data seems to come through fine.
I don't fully understand the urlencoded issue, I thought that is something related to GET requests, not POST.
Using KHTTP, I don't have any option to send the data any other way. I simply assign a bunch of name/value pairs, I have the option to POST or GET, then put in the https URL, and the component does the rest, putting the response into a variable.
So if PayPal tech support is right, then a different component/utility function would be the next thing to try.
So, I need an alternative to KHTTP that will interface correctly with PayPal's API. Does this need to be a DLL that I install on the server? Or is there some other way to do this? It has been a long while since I have researched this kind of thing. All I really need to do is:
1. Assign name/value pairs.
2. POST to PayPal's API.
3. Receive the response back.
Would really appreciate any advice.