Skip to main content

Posts

Showing posts from August, 2017

Getting rid of request parameters from the request

In most service chaining and API invocations we might come across situations where we will require to remove the initial request URI from the request. If we take for an example the following scenario. 1. We need to obtain some parameters from the users of our API. Therefore we define a resource as below which takes the name and age What we really need to do is get the name of the student and return the exam grades information. For that we need to invoke a URL in the following format. http://www.mocky.io/v2/59a3e86f130000b013ce056d /getGrades/{query.param.name} But with the request URI already been defined in step (1) the request which will be sent is the one below http://www.mocky.io/v2/59a3e86f130000b013ce056d /getGrades/{query.param.name}?name=Jessie&age=20 Since the backend does not identity a request with such trailing parameters it will fail. How can we get rid of the trailing query parameters from the request (1)?? It's pretty simple. We have a property