{"action":"created","issue":{"url":"https://api.github.com/repos/paulcbetts/refit/issues/334","repository_url":"https://api.github.com/repos/paulcbetts/refit","labels_url":"https://api.github.com/repos/paulcbetts/refit/issues/334/labels{/name}","comments_url":"https://api.github.com/repos/paulcbetts/refit/issues/334/comments","events_url":"https://api.github.com/repos/paulcbetts/refit/issues/334/events","html_url":"https://github.com/paulcbetts/refit/issues/334","id":239985866,"number":334,"title":"Shared/Global Query Parameter Values","user":{"login":"adamfisher","id":1834711,"avatar_url":"https://avatars0.githubusercontent.com/u/1834711?v=3","gravatar_id":"","url":"https://api.github.com/users/adamfisher","html_url":"https://github.com/adamfisher","followers_url":"https://api.github.com/users/adamfisher/followers","following_url":"https://api.github.com/users/adamfisher/following{/other_user}","gists_url":"https://api.github.com/users/adamfisher/gists{/gist_id}","starred_url":"https://api.github.com/users/adamfisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamfisher/subscriptions","organizations_url":"https://api.github.com/users/adamfisher/orgs","repos_url":"https://api.github.com/users/adamfisher/repos","events_url":"https://api.github.com/users/adamfisher/events{/privacy}","received_events_url":"https://api.github.com/users/adamfisher/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-07-02T03:14:30Z","updated_at":"2017-07-02T21:15:33Z","closed_at":"2017-07-02T20:25:13Z","body":"Lets assume I have a service defined with two endpoints as shown below. How would I go about removing the api key parameter from all of the methods and allowing it to be globally added as a query parameter for both endpoints?\r\n\r\nIn other words, given multiple endpoints that all need to have the same query parameter value, how can you tell Refit about it such that the value does not need to be passed in to each endpoint method that requires it?\r\n\r\n```csharp\r\npublic interface ISomeApi\r\n{\r\n\t[Get(\"endpoint1\")]\r\n\tobject GetEndpoint1(string apiKey, string paramA);\r\n\r\n\t[Get(\"endpoint2\")]\r\n\tobject GetEndpoint2(string apiKey, string paramB);\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/paulcbetts/refit/issues/comments/312517414","html_url":"https://github.com/paulcbetts/refit/issues/334#issuecomment-312517414","issue_url":"https://api.github.com/repos/paulcbetts/refit/issues/334","id":312517414,"user":{"login":"onovotny","id":1427284,"avatar_url":"https://avatars1.githubusercontent.com/u/1427284?v=3","gravatar_id":"","url":"https://api.github.com/users/onovotny","html_url":"https://github.com/onovotny","followers_url":"https://api.github.com/users/onovotny/followers","following_url":"https://api.github.com/users/onovotny/following{/other_user}","gists_url":"https://api.github.com/users/onovotny/gists{/gist_id}","starred_url":"https://api.github.com/users/onovotny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onovotny/subscriptions","organizations_url":"https://api.github.com/users/onovotny/orgs","repos_url":"https://api.github.com/users/onovotny/repos","events_url":"https://api.github.com/users/onovotny/events{/privacy}","received_events_url":"https://api.github.com/users/onovotny/received_events","type":"User","site_admin":false},"created_at":"2017-07-02T21:15:33Z","updated_at":"2017-07-02T21:15:33Z","body":"You could do that with a custom HttpClientHandler that always adds a parameter to the request. If you look at how AuthenticatedHttpClientHandler adds the auth header, it would be similar. HttpClientHandlers can be nested too so you can stack them together."}}
{"actor":{"display_login":"onovotny"}}