The Situation:
Imagine two servers A and B. Server B just outputs a PDF file that nicely displays information retrieved from any xml string passed to it via a url parameter. Server A’s job is to build an xml string, append this xml string onto a url (pointing to the code on Server B) as a parameter, and then call the url using php’s readfile() function…
The Question:
Is there a way to do the same thing (readfile on remote server and output to browser) in TCL?
If your script is doing output on its stdout channel (or pretending to) then you can use some extra tricks of Tcl’s http package so that you keep the data in the OS layer rather than dragging it through your code directly:
This is assuming that the fetch from the remote host is a POST so default handling of the
-queryoption is suitable. Since we’re sending a body in our request, it’s not a GET (and it’s definitely not a PUT…)