ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

http_url_post

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • http_url_post

    I just want to make sure I'm using the correct HTTP API for what I'm trying to do. I need to retrieve a token from a vendor by using application/x-www-form-urlencoded. I've cloned HTTP API's EXAMPLE15 which uses http_url_post. It works perfectly. The way this is used in the example, it saves the results to an IFS file I specify. Is there a different API or method where I can get the results returned into a variable? I can work with the file, but would prefer working with a variable. I just feel like it might be a little faster, but have nothing to base that on

    Your friends list is empty!

  • #2
    http_url_post() is a legacy interface. It still works, but I don't recommend using it in new programs.

    Try using http_req() or http_string()

    Comment


    • #3
      For similar work I've used the more generic http_req which allows you to make any request and to receive the result either as a stream file OR directly in a variable.

      Comment


      • #4
        Excellent. I've used http_string() a few times. Thank you.
        Your friends list is empty!

        Comment

        Working...
        X