Programming Languages on Power

Power Programming Languages

IBM Power, including the AIX, IBM i, and Linux operating systems, support a wide range of programming languages, catering to both traditional enterprise applications and modern development needs.


#Power

 View Only
  • 1.  QSYS2.HTTP_POST Example with Content-Type application/x-www-form-urlencoded

    Posted Tue November 22, 2022 11:21 PM
    Can someone provide, or point me to, an example of using QSYS2.HTTP_POST where the Content-Type is application/x-www-form-urlencoded?  I'm not sure how to send the data in the body of the request other than when it is application/json.

    ------------------------------
    Amy Vozza
    ------------------------------

    #SQL


  • 2.  RE: QSYS2.HTTP_POST Example with Content-Type application/x-www-form-urlencoded

    Posted Tue November 29, 2022 10:43 AM
    Here's an example calling a language translation service.

    VALUES
      HTTP_POST('https://translate.argosopentech.com/translate',
       'q=Can%20I%20see%20the%20wine%list%3F&source=en&target=es&api_key=xxxxxxxx',
       '{"header":"accept, application/json",
         "header":"Content-Type, application/x-www-form-urlencoded",
         "sslTolerate":"true"} ')

    ------------------------------
    Kent Milligan
    ------------------------------



  • 3.  RE: QSYS2.HTTP_POST Example with Content-Type application/x-www-form-urlencoded

    Posted Tue November 29, 2022 03:02 PM
    Thank you.

    ------------------------------
    Amy Vozza
    ------------------------------