Closed joesustaric closed 2 years ago
Hi there,
I'd like to use this library to test with the GitHub client.
From their docs I would need to inject an Oauth2 client to handle the Oauth2 dance https://github.com/google/go-github/blob/master/example/tokenauth/main.go#L29
Is it possible to use go-vcr with an Oauth2 client to save responses and replay them later?
My understanding is that the recorder needs to be injected into the client as the Transport https://github.com/dnaeon/go-vcr/blob/master/example/https_test.go#L46
I'm still poking around both libraries but don't know a lot about the internals of the Oauth2 and http libraries. Is this even possible?
Any assistance would be appreciated
Thanks
Hey @joesustaric ,
Please check issue https://github.com/dnaeon/go-vcr/issues/59, which discusses go-github and go-vcr in particular.
go-github
go-vcr
Oh yes thank you - I think that's what I needed.
👍
Hi there,
I'd like to use this library to test with the GitHub client.
From their docs I would need to inject an Oauth2 client to handle the Oauth2 dance https://github.com/google/go-github/blob/master/example/tokenauth/main.go#L29
Is it possible to use go-vcr with an Oauth2 client to save responses and replay them later?
My understanding is that the recorder needs to be injected into the client as the Transport https://github.com/dnaeon/go-vcr/blob/master/example/https_test.go#L46
I'm still poking around both libraries but don't know a lot about the internals of the Oauth2 and http libraries. Is this even possible?
Any assistance would be appreciated
Thanks