View Full Version : This stuff only works in DataFlex 18.1+

Mike Peat
14-Sep-2015, 12:40 PM
In case it has not been clear, the OAuth2 component will only work in DataFlex 18.1 and higher, because it makes use of the new HttpVerbAddrRequest function of the cHttpTransfer class, which was added specifically to support working with RESTful APIs.

In fact in the case of the OAuth2 component itself, that is simply because in working with REST APIs I have fallen into the habit of using HttpVerbAddrRequest rather than the alternatives: the component itself only actually uses GET and POST, so could be reverse engineered to work with earlier versions (I think: I have not tried), however the JavaScript side is a DF web app framework component and thus would only function as it stands in, at earliest, VDF 17.1 (again, I have not tried). The sample program in the OAuth2 workspace also relies on HttpVerbAddrRequest, although again that could probably be modified in most cases.

However other work I am doing on specific APIs (some of which I hope will appear here shortly) requires HttpVerbAddrRequest, because some of those APIs (most of them, actually) use HTTP verbs other than GET and POST (John tells me that the old PUT request never actually worked). Most REST APIs typically use at least GET, POST and DELETE, with some making use of PATCH and PUT. In DataFlex the only support for DELETE, PATCH and PUT is through HttpVerbAddrRequest, so for those DF 18.1+ is a requirement. That work also makes use of the - again, new in 18.1 - UChar array support functions; this is especially important in dealing with retrieving data the size of which you do not know in advance and handling binary data (Office documents, PDF files, Images, etc.).

Bottom line: if you are going to use this stuff you need to get onto DF 18.1!