HTTP Redirects Handling strategy with go-kit endpoints

235 views
Skip to first unread message

Joel Unzain

unread,
Oct 3, 2017, 12:15:29 AM10/3/17
to Go kit
I am having a hard time finding a better way to handle 307 redirects responses to POST requests with the way go-kit handles the client. 

I currently intercept the 307 responses and make a second request using the ClientAfter approach (https://github.com/go-kit/kit/blob/master/transport/http/client.go#L70)

However, I do not like it as it feels like a hack. Anybody have any suggestions?

Finally, what was the design choice in making the body always nil but allow generic methods: https://github.com/go-kit/kit/blob/master/transport/http/client.go#L106

Reply all
Reply to author
Forward
0 new messages