I am trying to see whether I can make a sideband call to an external URL and parse the response.
I've looked at the various 'official' examples I could find:
and elsewhere on the 'web, but I'm not seeing exactly what I want - almost everyone is calling a virtual server via an IP address/port.
Basically, can I make a call (in an HTTP_REQUEST) to a URL and receive a response? Is there an example of calling e.g.
and then receive the response and create a cookie (ignore whether the cookie needs to be created in the HTTP_REQUEST or HTTP_RESPONSE at this point)...
I think Aaron's is one of the better examples of a sideband call:
Notice in his example that he's defining the virtual server to send the request:
set static::sb_vserver "sideband_dest_vs"
It is always-always-always (did I mention always) a best practice to target a virtual server versus contacting a remote server directly. Not to mention sideband calls don't directly support HTTPS/SSL requests. Your remote server is defined in the pool of this internal port 80 HTTP virtual server, with a server SSL profile applied as required.
You're going to get the response back in the recv_data variable, which is going to be the raw HTTP payload. Now, should you need to make a cookie from that data, keep in mind you'll either have to do that in a response flow to the client, or completely preempt the server side flow with an HTTP redirect or respond.