Running a REST Style Service

How to:

After you have configured a process flow and a nHTTP channel, you are ready to execute your REST style service.


Top of page

x
Procedure: How to Run a REST Style Service

To run a REST style service:

  1. Create a simple text file under the c:\temp\ directory (or if you configured for another directory, use the one you configured in the process flow). Name the file myfile.txt. This will be a file that we'll try to retrieve using the HTTP REST-Style service call.
  2. Open a web browser and issue a REST Style service call request by requesting the following URL:
    http://localhost:2222/get?file=myfile.txt

    The content of the file will be returned for display, as shown in the following image.

    The created process flow also contains logic to generate an error for a file that does not exist. For example, if you provide a request URL, such as http://localhost:2222/get?file=error.txt, then the following error message will be returned in the browser indicating that the file is not found.


iWay Software