You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is common to have code that consumes external web service within the request handler. Can we have an example on this case? E.g. call one of the APIs of https://openweathermap.org/api with non-blocking fashion within the request handler, then send back the response from the API to the client.
Thanks!
The text was updated successfully, but these errors were encountered:
diorahman
changed the title
Example on consuming external web service withing request handler
Example on consuming external web service within request handler
Apr 3, 2017
The proxy example is similar to this, except instead of forwarding the original HTTP message, you would just create a new one.
eg: from onRequest, or onEOM, you would use the HTTPConnector to establish a new session, from there create a new transaction and send your request. The Handler object will receive the response and you can process it how you like. If you stream it directly to the client (as the proxy does) the flow control code is also in the example.
Hi,
It is common to have code that consumes external web service within the request handler. Can we have an example on this case? E.g. call one of the APIs of https://openweathermap.org/api with non-blocking fashion within the request handler, then send back the response from the API to the client.
Thanks!
The text was updated successfully, but these errors were encountered: