{"action":"created","issue":{"url":"https://api.github.com/repos/sindresorhus/got/issues/495","repository_url":"https://api.github.com/repos/sindresorhus/got","labels_url":"https://api.github.com/repos/sindresorhus/got/issues/495/labels{/name}","comments_url":"https://api.github.com/repos/sindresorhus/got/issues/495/comments","events_url":"https://api.github.com/repos/sindresorhus/got/issues/495/events","html_url":"https://github.com/sindresorhus/got/pull/495","id":336899850,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4MjQxNDM4","number":495,"title":"Support discrete client configuration via `got.create([options])`","user":{"login":"knksmith57","id":796851,"node_id":"MDQ6VXNlcjc5Njg1MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/796851?v=4","gravatar_id":"","url":"https://api.github.com/users/knksmith57","html_url":"https://github.com/knksmith57","followers_url":"https://api.github.com/users/knksmith57/followers","following_url":"https://api.github.com/users/knksmith57/following{/other_user}","gists_url":"https://api.github.com/users/knksmith57/gists{/gist_id}","starred_url":"https://api.github.com/users/knksmith57/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knksmith57/subscriptions","organizations_url":"https://api.github.com/users/knksmith57/orgs","repos_url":"https://api.github.com/users/knksmith57/repos","events_url":"https://api.github.com/users/knksmith57/events{/privacy}","received_events_url":"https://api.github.com/users/knksmith57/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-06-29T07:53:55Z","updated_at":"2018-07-01T06:56:12Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/sindresorhus/got/pulls/495","html_url":"https://github.com/sindresorhus/got/pull/495","diff_url":"https://github.com/sindresorhus/got/pull/495.diff","patch_url":"https://github.com/sindresorhus/got/pull/495.patch"},"body":"Add first-class support for discrete client configuration via new public `got.create([options])` method.\r\n\r\nFeature is 100% backwards compatible and internal defaults have been refactored ever so slightly to dogfood the interface.\r\n\r\nI did my best to adhere to existing code standards-- linted w/ `xo`, added tests to maintain coverage (statements + lines are slightly up, branches are slightly down), documented the method in `readme.md`, and tailored the commit message style to match the predominant pattern.\r\n\r\nMy first time contributing here so please let me know if there's anything else I can do to help! If y'all prefer to keep this out of core I'll understand and can publish elsewhere-- no hard feelings either way.\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/sindresorhus/got/issues/comments/401587720","html_url":"https://github.com/sindresorhus/got/pull/495#issuecomment-401587720","issue_url":"https://api.github.com/repos/sindresorhus/got/issues/495","id":401587720,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMTU4NzcyMA==","user":{"login":"ewolfe","id":32533397,"node_id":"MDQ6VXNlcjMyNTMzMzk3","avatar_url":"https://avatars2.githubusercontent.com/u/32533397?v=4","gravatar_id":"","url":"https://api.github.com/users/ewolfe","html_url":"https://github.com/ewolfe","followers_url":"https://api.github.com/users/ewolfe/followers","following_url":"https://api.github.com/users/ewolfe/following{/other_user}","gists_url":"https://api.github.com/users/ewolfe/gists{/gist_id}","starred_url":"https://api.github.com/users/ewolfe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ewolfe/subscriptions","organizations_url":"https://api.github.com/users/ewolfe/orgs","repos_url":"https://api.github.com/users/ewolfe/repos","events_url":"https://api.github.com/users/ewolfe/events{/privacy}","received_events_url":"https://api.github.com/users/ewolfe/received_events","type":"User","site_admin":false},"created_at":"2018-07-01T06:56:12Z","updated_at":"2018-07-01T06:56:12Z","author_association":"NONE","body":"I just pulled this down and it works great :) \r\n\r\nI found myself wanting to create an instance with a `hostname` option and using only the path as the argument to my instance. ie:\r\n\r\n```js\r\nconst client = got.create({\r\n  hostname: 'https://example.com',\r\n  path: '/api',\r\n  headers: {\r\n    Authorization: `Bearer ${TOKEN}`,\r\n  },\r\n});\r\n\r\nconst response = await client('/hello-world'); // GET https://example.com/api/hello-world\r\n```\r\n\r\nWhat are your thoughts on adding that functionality? I don't think it's _too_ opinionated and is in the spirit of the tagline \"Simplified HTTP requests\""}}
{"actor":{"display_login":"ewolfe"}}