Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 567973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:08:26+00:00 2026-05-13T13:08:26+00:00

The Progress docs spill plenty of ink on SOAP, but I’m having trouble finding

  • 0

The Progress docs spill plenty of ink on SOAP, but I’m having trouble finding the example for a simple HTTP GET/POST with Progress ABL.

How do I GET and POST strings to/from a URL?

Can the URL be https://?

Can Progress provide HTTP Basic or HTTP Digest authentication?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T13:08:26+00:00Added an answer on May 13, 2026 at 1:08 pm

    Openedge has built in statements for handling SOAP services, but no simple statement for a GET/POST. What it does have, however, is a mechanism to read / write to specific sockets. So you could use this to build a HTTP post routine, or for that matter a routine to handle any other socket based protocol.

    There is a routine – http.p – which will do a GET for you. Will let you see how the socket programming works if nothing else. You should be able to modify it quite easily to do a simple POST, but using SSL or getting into authentication might take quite a bit of work. You might be easier just dropping out to CURL in this case.

    http.p used to be available from freeframework.org, but I’ve just checked and that domain has expired, so I’ve posted the code below.

    /*-----------------------------------------------------------------------*
      File........: http.p
      Version.....: 1.1
      Description : Makes a "Get" request from an HTTP server
      Input Param : pHost = host name (without the "http://")
                    pPort = port number (usually 80)
                    pURL =  begin with the first slash after the domain name.
    
      Output Param: pResult = 0 or 1 (character)
                    pResponse = http headers returned
                    pContent = the document returned.
      Author......: S.E. Southwell, Mario Paranhos -  United Systems, Inc. (770) 449-9696
      Created.....: 12/13/2000
      Notes.......: Will not work with HTTPS.
      Usage:
            define var v-result as char no-undo.
            define var v-response as char no-undo.
            define var v-content as char no-undo.
            {&out} "Hello" skip.
            put stream webstream control null(0).
            run proc/http.p("www.whosplayin.com","80","/",output v-result,output v-response,output v-content).
            {&out} v-result "<hr>" skip
            html-encode(v-response) "<hr>" skip
            html-encode(v-content) "<hr>" skip
            .
    
      Last Modified: 10/20/01 - SES - Fixed to work in batch mode, or within a UDF.
    --------------------------------------------------------------------------*/
    
    
    
    &SCOPED-DEFINE HTTP-NEWLINE CHR(13) + CHR(10)
    &SCOPED-DEFINE RESPONSE-TIMEOUT 45
    
    DEFINE INPUT PARAMETER pHOST        AS CHAR NO-UNDO.
    DEFINE INPUT PARAMETER pPORT        AS CHAR NO-UNDO.
    DEFINE INPUT PARAMETER pURL         AS CHAR NO-UNDO.
    DEFINE OUTPUT PARAMETER pRESULT     AS CHAR NO-UNDO.
    DEFINE OUTPUT PARAMETER pRESPONSE   AS CHAR NO-UNDO.
    DEFINE OUTPUT PARAMETER pContent    AS CHAR NO-UNDO.
    
    
    DEFINE VARIABLE requestString       AS CHAR   NO-UNDO.
    DEFINE VARIABLE vSocket             AS HANDLE NO-UNDO.   
    DEFINE VARIABLE vBuffer             AS MEMPTR NO-UNDO.
    DEFINE VARIABLE vloop               AS LOGICAL NO-UNDO.
    DEFINE VARIABLE vPackets            AS INTEGER NO-UNDO.
    DEFINE VARIABLE wStatus             AS LOGICAL NO-UNDO.
    
    ASSIGN requestString = "GET " + pURL + " HTTP/1.0" + {&HTTP-NEWLINE} +
              "Accept: */*" + {&HTTP-NEWLINE} + 
              "Host: " + phost + {&HTTP-NEWLINE} + 
              /*"Connection: Keep-Alive" + {&HTTP-NEWLINE} + */
              {&HTTP-NEWLINE}.
    
    /*OPEN THE SOCKET*/
    CREATE SOCKET vSocket.
    vSocket:SET-READ-RESPONSE-PROCEDURE ("readHandler",THIS-PROCEDURE).
    ASSIGN wstatus = vSocket:CONNECT("-H " + phost + " -S " + pport) NO-ERROR.
    
    /*Now make sure the socket is open*/
    IF wstatus = NO THEN DO:
        pResult = "0:No Socket".
        DELETE OBJECT vSocket.
        RETURN.
    END.
    
    /*Got socket - Now make HTTP request*/
    
    SET-SIZE(vBuffer) = LENGTH(requestString) + 1.
    PUT-STRING(vBuffer,1) = requestString.
    vSocket:WRITE(vBuffer, 1, LENGTH(requestString)).
    SET-SIZE(vBuffer) = 0.
    
    /*Wait for a response*/
    ASSIGN vloop = TRUE.  /*Turns off automatically when request is done*/
    DEFINE VAR vstarttime AS INTEGER.
    ASSIGN vstarttime = etime.
    
    WAITLOOP: DO WHILE vloop:
        PROCESS EVENTS.
        PAUSE 1.
        /* Build in timer in case sending is never set to NO 
           this will terminate the program after 60 seconds
           start-Etime will be reset by WriteData each time there
           is activity on the socket to allow for long transmissions */
        IF vstarttime + ({&RESPONSE-TIMEOUT} * 1000) < ETIME 
         THEN DO:
            MESSAGE "timed out at " + string(etime - vstarttime) + " msec".
            vSocket:DISCONNECT().
            ASSIGN pResult = "0:Failure".
            RETURN.
        END. /*No Response, or timed out*/
    END.
    
    
    
    /*At this point, pResponse should be populated with the result (up to 32K)*/
    
    
    vSocket:DISCONNECT().
    
    DELETE OBJECT vSocket.
    /*All Done!*/
    ASSIGN pResult = "1:Success".
    ASSIGN 
     pContent = SUBSTRING(pResponse,INDEX(pResponse,{&HTTP-NEWLINE} + {&HTTP-NEWLINE}),-1)
     .
    ASSIGN
     pResponse = SUBSTRING(pResponse,1,INDEX(pResponse,{&HTTP-NEWLINE} + {&HTTP-NEWLINE}))
    .
    
    RETURN.
    
    
    /*Handle the response from the webserver*/
    PROCEDURE readHandler:
        DEFINE VARIABLE bytesAvail  AS INTEGER  NO-UNDO.
        DEFINE VARIABLE b           AS MEMPTR   NO-UNDO.
        DEFINE VARIABLE lastBytes   AS INTEGER  NO-UNDO.
    
        IF vSocket:connected() THEN ASSIGN bytesAvail = vSocket:GET-BYTES-AVAILABLE().
    
        IF bytesAvail = 0 THEN DO: /*All Done*/
          ASSIGN vloop = FALSE.
          RETURN.
        END.
    
    
        /*OK, there's something on the wire... Read it in*/    
        SET-SIZE(b) = bytesAvail + 1.
        vSocket:READ(b, 1, bytesAvail, 1).
        ASSIGN pResponse = pResponse + GET-STRING(b,1).
        SET-SIZE(b) = 0.
    END PROCEDURE. /*readHandler*/
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm adapting this progress bar:http://www.richardshepherd.com/tv/audio/ to work with my playlist code, but I can't
I am trying to do an assignment but I'm having trouble with the first
I am not too experienced with Java and am having trouble getting a progress
I have made some progress with the DataList and UserControl this morning but I
http://code.google.com/intl/en/appengine/docs/python/tools/uploadingdata.html the api is : Downloading Data from App Engine To start a data
I'm having trouble accessing the content of QNetworkReply objects. Content appears to be empty
I am trying to implement async file upload with progress with sonatype async http
I went through the documentation( http://java.sun.com/javase/6/docs/api/java/util/Iterator.html ) of Iterator.remove() there remove( ) was described
The docs say all I need to do is add this: [extensions] progress =
I`ve followed the guidelines in http://celeryq.org/docs/django-celery/getting-started/first-steps-with-django.html and created a view that calls my test

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.