Open source Http client on OpenEdge

Posted by Aleksey on 09-Apr-2014 07:54

Hi,


Recently I decided to try stack of new OE tools (at least for me new). Like SmartDox documentation genearator and OEUnit test framework and try to OOP in OE. I saw several question about "How I can make http request?" and the answer was "Use .Net or write your own socket client".

So considering that I decided to make HttpClient. Of course you can you use one from .Net but this is not true Open edge developer way :)

I very satisfied with SmartDox and OEUnit it worked just fine for me. And I will use them more.

As result I got http client. It has really small realization of http protocol. Only very basics. It doesn't support https which makes it not really usable. But you can call web sites and REST api which is not required https.

You can see, download on Bitbucket and use it. It has html documentation and some unit tests.

So if you think it is needed by someone I can try develop it further.

What is bad as there is no native OE basic classes like List or Dictionaries I wish also to fix this but have no time.

All Replies

Posted by Mike Fechner on 09-Apr-2014 11:10

Hi Aleksey, I like the documentation ;-)

Does your http client only support GET or also POST and other REST typical request methods, like for instance PUT?

Posted by Aleksey on 10-Apr-2014 03:29

Hi, Mike

:) documentation, well I only put comments other magic done by PCT and you :)

Well good question. But what the difference between PUT/POST/DELETE and GET? As understood it just method you send to server in http request. Is any special client support needed?

So I would guess it support as you can specify any method as character parameter.

But will check these days when will have spare 10 minutes :)

Posted by Mike Fechner on 10-Apr-2014 03:36
GET and POST/PUT/… are different in what and how you send the info to the server.
 
For GET everything is delivered at part of the request header.
 
For POST/PUT/… after the header you need to deliver an empty line followed by the data that you post.
[collapse]
From: Aleksey [mailto:bounce-Aleksey@community.progress.com]
Sent: Donnerstag, 10. April 2014 10:30
To: TU.OE.Development@community.progress.com
Subject: RE: Open source Http client on OpenEdge
 
Reply by Aleksey

Hi, Mike

:) documentation, well I only put comments other magic done by PCT and you :)

Well good question. But what the difference between PUT/POST/DELETE and GET? As understood it just method you send to server in http request. Is any special client support needed?

So I would guess it support as you can specify any method as character parameter.

But will check these days when will have spare 10 minutes :)

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]
Posted by Aleksey on 10-Apr-2014 04:02

Yes it always sends header + empty line + body if exists.

Actually by HTTP/1.1 Host key in header is mandatory. So I add it is now from the box.

So it means I always have header and empty line afterwards.

Posted by CMI on 10-Apr-2014 15:21

Here's a little project I started of creating a 90% pure HTTP client. The main focus was to handle SSL connections, handling redirections, cookies, able to handle REST request and handling GZIP compressed content. I started the project but I ran out of time and so it's not complete.

github.com/.../ABL-HTTP-Web-Request

I was based my design on a commercial product from Chilkat

www.chilkatsoft.com/http-features.asp

Posted by Ricardo Perdigao on 16-May-2014 09:49

CMI,

What is missing from your project?  What works and what still needs to be completed?

Thanks in advance,

Ricardo

Posted by Matt Baker on 29-Oct-2014 16:09

In 11.4, there is one built -in.  Search here on communities for "making http requests with openedge.net.pl".

Posted by Marko Myllymäki on 31-Oct-2014 08:04

Matt, could you please provide a link to this information. I searched on communities (and KB) for that but couldn't find anything related to openedge.net.pl other than this thread and a couple of other threads on mobile push notification.

Also, I couldn't find any related documentation from 11.4 docs (except for mobile push notifications).

Posted by Peter Judge on 31-Oct-2014 08:38
Hi Marko,
 
Matt's referring to something that was posted on the 11.5 ESAP forum (so unless you're part of that, you won't be able to see it). It's a tech preview of the library 'under' the Push Notification Service, using basically the same code (there's some fixes for authentication).  You can still enroll in that program if you'd like, to get access to the doc etc.
 
-- peter
 
[collapse]
From: Marko Myllymäki [mailto:bounce-mmy@community.progress.com]
Sent: Friday, 31 October, 2014 09:06
To: TU.OE.Development@community.progress.com
Subject: RE: [Technical Users - OE Development] Open source Http client on OpenEdge
 
Reply by Marko Myllymäki

Matt, could you please provide a link to this information. I searched on communities (and KB) for that but couldn't find anything related to openedge.net.pl other than this thread and a couple of other threads on mobile push notification.

Also, I couldn't find any related documentation from 11.4 docs (except for mobile push notifications).

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]
Posted by Matt Baker on 31-Oct-2014 13:46

Didn't realize it was part of 11.5 ESAP :)

Posted by Marko Myllymäki on 03-Nov-2014 01:58

Thanks, Peter, for the clarification, I haven't participated in 11.5 ESAP so that's the reason. In 11.4 installation I found openedge.net.pl which includes classes like HttpRequest etc. but I guess those are undocumented (preview) features in 11.4 and finished in 11.5.

Posted by Peter Judge on 03-Nov-2014 07:47
Yep, that's more or less the plan (but with 11.5.0 being the preview). Feature-wise, the main difference in 11.5 is that basic/digest auth now works properly.
The reason why I suggested you lok at the ESAP is that there's a doc that describes the feature.
 
-- peter
 
[collapse]
From: Marko Myllymäki [mailto:bounce-mmy@community.progress.com]
Sent: Monday, 03 November, 2014 02:59
To: TU.OE.Development@community.progress.com
Subject: RE: [Technical Users - OE Development] Open source Http client on OpenEdge
 
Reply by Marko Myllymäki

Thanks, Peter, for the clarification, I haven't participated in 11.5 ESAP so that's the reason. In 11.4 installation I found openedge.net.pl which includes classes like HttpRequest etc. but I guess those are undocumented (preview) features in 11.4 and finished in 11.5.

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]
This thread is closed