#adam-williams_best-practices
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1344341457493950575
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
It appears as if none of the SDKs actually have anything in this area - the docs just give you a cURL example
so - sure - I can use my own HTTP client and set my own Authorization request header
but .. I want to make use of the Golang Stripe SDK - is there some way I can reach into the internals and grab the (authenticated) HTTP client that Stripe uses itself? Or retrieve the headers the client sets?
Yeah we don't have a sdk method for this. We just use http basic auth though. You can provide your API key as the basic auth username value. You do not need to provide a password.
Okay - is there an accepted way to retrieve the Key given a stripe.Client - or would you suggest just pulling it from config manually?
it doesn't seem very well catered for
Yeah just pull it from your env variable
alright ๐
Agree this flow can be improved