You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to htt...@googlegroups.com
I am building a client with which I intend to make several requests. I do not need or want a persistent connection because there will be long intervals between my requests. The code to do this is pretty straightforward:
client = HTTP.auth(“Bearer #{my_token}”).headers(accept: “application/json”)
And then I can make requests with the client object I just created.
What I would like to do is then modify the client object conditionally based on parameters I send when building the client (such as logging and proxy)
I have tried to modify client right after creating it:
client = client..use(logging: {logger: Logger.new("log/http.log")})
Or
client = client.via(“localhost”, 9090)
But these do not seem to modify client for future requests.
Any ideas on how I might accomplish this?
Thanks,
Scott
Scott Wright
unread,
Mar 21, 2021, 5:36:31 AM3/21/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to htt...@googlegroups.com
After further investigation this works as expected:
client = client.via(“localhost”, 9090)
Does add the proxy to client for all future requests.