Thanks- On receiving a request for an object (say at URL1), I’m trying to fetch a different file (URL2) that contains some authorization data to determine if the original request should be allowed.
My hope was to find a more compact way to build a new request, do a TSHttpConnect() and then read the contents of URL2 into a buffer. —Eric > On Jun 21, 2019, at 1:05 AM, Shu Kit Chan <chanshu...@gmail.com> wrote: > > Hopefully this is of help. > > https://github.com/apache/trafficserver/pull/5639/files#diff-5c2f3297b2a6ac986fbf042017435a6a > > It illustrates an example of using the Lua script to get the content > of a response into variable and print it out. > > Kit > > On Thu, Jun 20, 2019 at 5:41 PM Eric Friedrich -X (efriedri - TRITON > UK BIDCO LIMITED c/o Alter Domus (UK) Limited -OBO at Cisco) > <efrie...@cisco.com.invalid> wrote: >> >> Is there a simple API call to use to fetch the contents of a URL into a >> buffer? >> >> I found an example of something close in the authproxy sample plugin, but >> there looks to be almost a hundred lines of rather boilerplate code. I’d >> like to avoid the copy and paste if I can >> >> —Eric >>