GET https Reponse Data (WebSpeed)

jprog

New Member
Using WebSpeed, I have a need to capture a response from a website. I can access a URL thru its .com name with & name values and I get & name values back in the body of the page. I need a way to initiate the request and capture the returned values in the body.

I seems it should be as simple as opening up a stream to the URL and capture the values in the body.

If someone could give me a simple example, it would be great.
 
And this is related to Webspeed as in the web site that returns 'values' runs Webspeed?

If you do get the response back and this is plain text as: name=val[&name=val...] then you just need to parse that using entry/num-entries, better yet if you have any control over the other side then make them a request to format the output in xml format (if you can get a xml schema even better).

If you only get the response in your web browser and want to do the same inside your webspeed app then look for http.p variants floating around, i think the initial version was available as part of freeframework... http://sourceforge.net/projects/freeframework/
 
I agree with m.edu, the best solution is to see if the site can provide you with output in xml format and then you can use the various Progress XML methods available. Alternatively, you could use wget or curl to retrieve the page and read in the results using INPUT THROUGH, something like this:

Code:
    INPUT THROUGH VALUE ("curl -s -S ~"" + yourURL + "~"") NO-ECHO.
    REPEAT:
        IMPORT UNFORMATTED htmlLine.
        /* Parse HTML a line at a time
            .....
        */
    END.
    INPUT CLOSE.
 
Back
Top