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

Is it possible to build some simple (?) logic on nginx (plus?) instead of creating backend services?

$
0
0
Hi!
Need to divide primary post json request into 2 subrequest (get and post).
So we have some kind of proprietary software and need to interact with it by 2-step logic. First send a question with procId, like this get https://backend1/gettask?process=[procId]. The value of procId should be taken from primary request (in url or in json, anyway – its our soft and our design). Receive json like ‘[{“taskid”: “aa1-aa2”, “descry”: “some info”, …}]’ from this json should take value of “taskid” (in this example its “aa1-aa2”). And second step send post to https://backend2/[value taskId]/GetData with header application/json and json body from primary post request. The result of this second request should be forwarding as a final request back to our soft.

Viewing all articles
Browse latest Browse all 4759

Trending Articles



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