You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For cases where you implement your own Client and override send(), it doesn't seem right to mutate the caller's request object.
It'd be better if BaseRequest were easily able to be copied. Not only would this allow you to keep from mutating the caller's object under their feet, but it would allow you to hide potentially sensitive information from the caller. e.g. in the use case that spawned this bug, the client is adding authentication headers to the request, and it's an explicit directive from the auth team that the scope of the OAuth token "leakage" be limited to auth libraries (that have undergone security review, etc.).
The text was updated successfully, but these errors were encountered:
Hi guys, this is an old request but I still can't see any of this in the library and I still think it should be part of the lib.
I think that a method like copy or copyWith replacing certain values of the request will be really usefull, specially if you want to automatically modify the request on the send method.
For cases where you implement your own
Client
and overridesend()
, it doesn't seem right to mutate the caller'srequest
object.It'd be better if
BaseRequest
were easily able to be copied. Not only would this allow you to keep from mutating the caller's object under their feet, but it would allow you to hide potentially sensitive information from the caller. e.g. in the use case that spawned this bug, the client is adding authentication headers to the request, and it's an explicit directive from the auth team that the scope of the OAuth token "leakage" be limited to auth libraries (that have undergone security review, etc.).The text was updated successfully, but these errors were encountered: