REST: Difference between revisions

From DataFlex Wiki
Jump to navigationJump to search
Created page with " With DataFlex you can create RESTful web services as well as consume those web services. == Client side == Consuming [https://en.wikipedia.org/wiki/Representational_state_tr..."
 
 
(10 intermediate revisions by 3 users not shown)
Line 3: Line 3:


== Client side ==
== Client side ==
Consuming [https://en.wikipedia.org/wiki/Representational_state_transfer REST] services was made a lot easier since DataFlex 19.0 when it added native JSON support.
Consuming [https://en.wikipedia.org/wiki/Representational_state_transfer REST] services was made a lot easier since DataFlex 19.0 when it added native [[JSON]] support.


Consume a REST service:
Consume a REST service:
See [https://docs.dataaccess.com/dataflexhelp/mergedProjects/VDFClassRef/cJsonHttpTransfer.htm cJsonHttpTransfer] and [https://docs.dataaccess.com/dataflexhelp/mergedProjects/Welcome/JSON_Parsing_and_Transfer.htm JSON Parsing and Transfer]
See [https://docs.dataaccess.com/dataflexhelp/mergedProjects/VDFClassRef/cJsonHttpTransfer.htm cJsonHttpTransfer] and [https://docs.dataaccess.com/dataflexhelp/mergedProjects/Welcome/JSON_Parsing_and_Transfer.htm JSON Parsing and Transfer]
You can find a demo of how-to use cJsonHttpTransfer in DAWs WebOrder workspace.


== Server side ==
== Server side ==
Creating REST web services has been made easy since DataFlex 19.1 with the introduction of the [https://docs.dataaccess.com/dataflexhelp/mergedProjects/VDFClassRef/cWebHttpHandler.htm cWebHttpHandler] handler.
Creating REST web services has been made easy since DataFlex 19.1 with the introduction of the [https://docs.dataaccess.com/dataflexhelp/mergedProjects/VDFClassRef/cWebHttpHandler.htm cWebHttpHandler] handler.
For an example see the DemoSimpleRestService.wo file in the WebOrder example workspace.


You can create a REST service with earlier DataFlex versions, see [https://www.unicorninterglobal.com/Company-White-Papers-Creating-RESTful-JSON-Web-Services-in-DataFlex-868 here] for how-to do so in DataFlex 19.0, but it is probably better to use DataFlex 19.1 in that case.
You can create a REST service with earlier DataFlex versions, see [https://www.unicorninterglobal.com/Company-White-Papers-Creating-RESTful-JSON-Web-Services-in-DataFlex-868 here] for how-to do so in DataFlex 19.0, but it is probably better to use DataFlex 19.1 in that case.
==See also==
*[[RESTful Service Theory]]
*[[RESTful Services in DataFlex]]
*[[Consuming RESTful Services in DataFlex]]
*[[Creating RESTful Services in DataFlex]]
*[[A Simple RESTful Service]]
*[[Using the REST Library]]


== External references ==
== External references ==


http://salzlechner.com/dev/2016/03/02/interfacing-dataflex-restful-web-services/
*[http://salzlechner.com/dev/2016/03/02/interfacing-dataflex-restful-web-services/ Interfacing DataFlex RESTful web services] ([[User: Starzen|Michael Salzlechner]])
 
*[https://docs.google.com/document/d/1N3BvvygKfjKO_5TMosWrR8aahI-5VOz6-z-8jSqA_to/edit?usp=sharing Synergy 2019 REST APIs Course Exercise Instructions] ([[User: Mikepeat|Mike Peat]])
[https://support.dataaccess.com/Forums/showthread.php?64503-New-REST-support forum post: New REST support]
*[https://learning.dataaccess.com/courses/synergy-2019/how-to-build-a-restful-api-in-dataflex-19.1/ Synergy 2019 presentation "Building RESTful APIs in DataFlex"] ([[User: Mikepeat|Mike Peat]])
 
*[https://support.dataaccess.com/Forums/forumdisplay.php?59-OAuth-RESTFul-amp-Web-API-Integration OAuth Restful & Web API integration] section of the [https://support.dataaccess.com/Forums/forum.php Data Access Support Forum]
[https://docs.google.com/document/d/1N3BvvygKfjKO_5TMosWrR8aahI-5VOz6-z-8jSqA_to/edit?usp=sharing Building RESTful webservices excercise notes (by Mike Peat)]
Sourced from [https://support.dataaccess.com/Forums/showthread.php?64503-New-REST-support forum post: New REST support]
* https://tools.chilkat.io/curl.cshtml (generate DataFlex code to use with Chilkat)
* [https://github.com/DataFlexCode/RestGen2022 RestGen2022] A tool to generate a DataFlex struct from JSON


[https://support.dataaccess.com/Forums/forumdisplay.php?59-OAuth-RESTFul-amp-Web-API-Integration OAuth Restful & Web API integration forum]
[[Category:REST]]
[[Category:Web Services]]
[[Category:System Integration]]
[[Category:JSON]]

Latest revision as of 15:07, 16 March 2024

With DataFlex you can create RESTful web services as well as consume those web services.

Client side

Consuming REST services was made a lot easier since DataFlex 19.0 when it added native JSON support.

Consume a REST service: See cJsonHttpTransfer and JSON Parsing and Transfer

You can find a demo of how-to use cJsonHttpTransfer in DAWs WebOrder workspace.

Server side

Creating REST web services has been made easy since DataFlex 19.1 with the introduction of the cWebHttpHandler handler.

For an example see the DemoSimpleRestService.wo file in the WebOrder example workspace.

You can create a REST service with earlier DataFlex versions, see here for how-to do so in DataFlex 19.0, but it is probably better to use DataFlex 19.1 in that case.

See also

External references

Sourced from forum post: New REST support