Question Emil Odobasic · Mar 5, 2024

Is it possible to receive an HTTP/REST request into a production, and send the request as it is in another request? If yes, what would be the best way to do this?

Hello everyone!
So, I am supposed to receive a REST-request into my production, and I need to send it, exactly as I received it, to another server.
I am struggling to find any good info on this, and have a hard time coming up with a good approach.
What would be the easiest way to do this?
- I have so far thought about possibly doing it with an EnsLib.REST.GenericService and then sending it with an EnsLib.REST.GenericOperation.
- I have also thought about manually creating a rest-service and somehow using %request and sending it directly if that would be possible.

I would be very thankful if I could get some tips on what would be the best approach for this task.
Thanks beforehand! :)

Comments

Enrico Parisi · Mar 5, 2024

I think that using EnsLib.REST.GenericService and EnsLib.REST.GenericOperation is the way to go.

0
Emil Odobasic  Mar 7, 2024 to Enrico Parisi

Hello!
Thanks for the reply! I got it to work finally with the help of WRC! :)

0
Luis Angel Pérez Ramos · Mar 5, 2024

Do you need to do something with the request? If you don't the best option is to delegate the redirection to the application server (Apache or whatever), avoiding to involve IRIS in the process.

0
Emil Odobasic  Mar 7, 2024 to Luis Angel Pérez Ramos

Hello!
Thank you for your response! :)

I am not doing anything special with the request. I am just supposed to receive the request and send it away, and then receive the response and show it to the original sender.
I did look into this matter with the help of WRC. We managed to make it work with what Enrico said, using an EnsLib.REST.GenericService and an EnsLib.REST.GenericOperation.

0