How to find url of a GET or POST browser request






Home Forums Ibis Adapter Framework How to find url of a GET or POST browser request

This topic contains 1 reply, has 2 voices, and was last updated by  Tom van der Heijden 3 months, 3 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2346

    Ap Reinders
    Keymaster

    Hi there,
    I made a receiver with a restlistener inside. In “test a pipeline” I can see it works but I can’t find which url to use. I tried things like “http://localhost:8080/Ibis4Me/iaf/api/customeroverview” but with no success. What exactly are the rules for GET and POST requests. The docs at maven.ibissource don’t state anything…

    <receiver className="nl.nn.adapterframework.receivers.GenericReceiver" name="GetCustomerOverview_Receiver">
    			<listener className="nl.nn.adapterframework.http.RestListener" uriPattern="customeroverview" method="GET" />
    		</receiver>
    #2347

    Hi Ap,

    I can see why this can be confusing. There are two ways now in which we use REST like calls. We got the very old “RestListener” and the very new “ApiListener”. For more RESTful calls I would use the newer ApiListener. With the new ApiListener you can make your uri pattern in a more collection/id style like: “authors/1/books/3” with the pattern being: “authors/{authorId}/books/{bookId}”. To use Api- or RestListener, you typically go to your application address, in your case: “http://localhost:8080/Ibis4Me” and then add /rest for the RestListener or /api for the ApiListener. After you declared what kind of servlet you want to use, you define your uriPattern: “customeroverview”. So in the end, if you are still using the RestListener, it will look like: “http://localhost:8080/Ibis4Me/rest/customeroverview”.

    I hope this made some things clear, good luck!

    P.S. “iaf/api” is for getting console information, like how many adapters there are in your application, etc.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.