sponsored links

Collapse

Announcement

Collapse
No announcement yet.

HTTPAPI PUT and Delete Commands

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

  • HTTPAPI PUT and Delete Commands

    Does anyone have an example of how to code RPG to use Scott's HTTPAPI for a put and delete command? I've used HTTPAPI's POST command for other vendors successfully, but now have a requirement from a vendor that requires me to use a PUT/DELETE commands to perform updates and deletes on a website. any help is greatly appreciated.

  • #2
    You would need to use the http_persist_req() routine to do these.

    Comment


    • #3
      Scott, I understand its all "easy" for you. but for a more challenged programmer, would you recommend your HTTPAPI procedures, or systools HTTP's for a programmer getting started with webservices and website posting?

      Comment


      • #4
        Jay, I'm trying to provide some assistance with HTTPAPI because you asked the question. I did not claim that using http_persist_req() was easy... In fact, making an easier way to do other operations (besides GET and POST) has been on my to-do list for about 2 yeras now. Problem is, I'm too busy and I have too many other things happening.

        Believe me, my life is NOT "easy".

        I'm not familiar with "systools HTTP's"?. Is "systools" the name of the company that publishes it? But, as I don't have time to work on my own HTTP tool, it is unlikely that I will try it or create a report comparing it to HTTPAPI.

        Comment


        • #5
          Scott - i apparently came off totally the wrong way - My intentions were to give you much credit for all the deep understanding and what you provide for the iSeries programming world. systools is part of the sql "stuff" on the iseries as of recent releases... so it's really a question of what's easier for the common progammer - the sql or rpgle http method I guess - i have been gravitating a lot towards sql - so probably the wrong guy to ask - keep up the good work and stuff that makes our lives easier. Just finished a big project utilizing your yajl procedures for JSON - love it.

          Comment


          • #6
            Jay,

            Have you looked at the new SYSTOOLS.HTTPGET capabilities? They look pretty powerful, but you need to be at the right OS level. The Relic Package Manager uses some of the capabilities to get stuff from github.
            https://github.com/OSSILE/RelicPackageManager source is available to see how they did it.

            Comment


            • #7
              Chris, I have written SQLRPGLE pgms that utilize systools.httppostclob. Nothing short of sweetness. i"ll take a look at your link.

              this is all you really need...

              d g_baseURL s 100 inz
              d g_xmlRequest s 32667 varying
              d g_xmlResponse s 32667 varying
              d l_httpHeader s 32667 varying

              // tell http method the content value we are working with...
              l_httpHeader = '<httpHeader>' +
              '<header name="Content-type"' +
              ' value="text/xml" />' +
              '</httpHeader>';

              exec sql
              select cast(responsemsg as varchar(32667))
              into :g_xmlResponse
              from table(systools.httppostclobverbose(:g_baseURL
              ,:l_httpHeader
              ,:g_xmlRequest)
              ) as REQUEST;




              Last edited by jayvaughn; January 17th, 2017, 12:59 PM.

              Comment

              sponsored links

              Collapse

              Working...
              X