graphql-client icon indicating copy to clipboard operation
graphql-client copied to clipboard

Make UserAgent request header optional

Open KirovAir opened this issue 1 year ago • 6 comments

As per title: Make UserAgent request header optional. Or even opt-in. For a lot of projects it's redundant and it can interfere with multi threaded applications where the HttpClient is shared. The Add() will cause a race condition error.

KirovAir avatar Jul 10 '22 21:07 KirovAir

I've added the requested changes. :) Do you think the function wrapper is needed? I have not so much experience with them so I'm not entirely sure if the current implementation is correct.

KirovAir avatar Jul 11 '22 20:07 KirovAir

function wrapper?

sungam3r avatar Jul 11 '22 22:07 sungam3r

It was a bit late, I ment the delegate around the option. 🙉 Anyway this current implementation works as intended.

KirovAir avatar Jul 12 '22 03:07 KirovAir

Conflicts 😕

sungam3r avatar Jul 12 '22 13:07 sungam3r

@KirovAir pls rebase on current master

rose-a avatar Jul 12 '22 14:07 rose-a

Done!

KirovAir avatar Jul 12 '22 17:07 KirovAir

closing in favor of #542

rose-a avatar Apr 13 '23 16:04 rose-a