Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Make multiple subrequests and generate custom response based on the subrequests' response.

$
0
0
Hi,

I have a use case where based on the contents of a file (accessed through URI), I need to get the contents of another file (again accessed through URI) and return the contents to the caller.

The exact scenario is this:

URI say http://localhost:80/xxx is invoked -> Based on a request header say X-REQUEST-NAME, formulate the paths of the URI say URI1, make a subrequest to URI1 and download the file say file1 -> Based on the content of the file file1, make another subrequest to a new URI URI2 and download the contents -> return this content to the caller

Is there anyway this can be done?

Regards,
Akshayaa

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>