machinebox / graphql

Simple low-level GraphQL HTTP client for Go
https://blog.machinebox.io/a-graphql-client-library-for-go-5bffd0455878
Apache License 2.0
933 stars 217 forks source link

Add before request function #44

Closed wojtii closed 3 years ago

wojtii commented 5 years ago

Hello, I have created this PR to add option to modify request (http.Request) just before doing it. Currently there is no option to have direct access to http.Request that is sent through client. For me this disables possibility to sign request. I use this signer - https://docs.aws.amazon.com/sdk-for-go/api/aws/signer/v4/#Signer.Sign to make IAM authorized calls but I can also think of more cases when it will be needed by someone.

What do you think about it?