This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Basics on using HTTPPost

I'm attempting to develop Cobol code to call an external sales tax calculation API (provided by Avalara/Avatax). HttpPost seems the most logical way to go as I will be sending & receiving responses. However, the basic format of the destination URL is getting the better of me. Simple test json url's, such as http://ip.jsonttest.com/ work fine and return responses. However when I need to send a complex URL with username/passwords & search parameters I'm getting nowhere.

Are there any step by step tutorials on this subject?

Any and all helpful comments are appreciated in advance!

  • 0

    Sending user credentials in the URL is a security flaw. 

    Just glanced at the Avatax PHP code to get an idea of the authorization method.  My 2-minute analysis is that the user credentials are being sent in the headers, not the URL.  In the HTTP Post code, you can use the extra header capability.  (Headers are encrypted, the URL is not.)

    Didn't look at search terms, but my guess is that the API is expecting a JSON structure in the POST request payload, and will return a JSON structure in the response payload.