{"action":"opened","issue":{"url":"https://api.github.com/repos/angular/angular/issues/5516","labels_url":"https://api.github.com/repos/angular/angular/issues/5516/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/5516/comments","events_url":"https://api.github.com/repos/angular/angular/issues/5516/events","html_url":"https://github.com/angular/angular/issues/5516","id":119607697,"number":5516,"title":"feat(http): improve ergonomics of search params","user":{"login":"cburgdorf","id":521109,"avatar_url":"https://avatars.githubusercontent.com/u/521109?v=3","gravatar_id":"","url":"https://api.github.com/users/cburgdorf","html_url":"https://github.com/cburgdorf","followers_url":"https://api.github.com/users/cburgdorf/followers","following_url":"https://api.github.com/users/cburgdorf/following{/other_user}","gists_url":"https://api.github.com/users/cburgdorf/gists{/gist_id}","starred_url":"https://api.github.com/users/cburgdorf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cburgdorf/subscriptions","organizations_url":"https://api.github.com/users/cburgdorf/orgs","repos_url":"https://api.github.com/users/cburgdorf/repos","events_url":"https://api.github.com/users/cburgdorf/events{/privacy}","received_events_url":"https://api.github.com/users/cburgdorf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-30T23:42:09Z","updated_at":"2015-11-30T23:42:09Z","closed_at":null,"body":"Currently one has to construct `URLSearchParams` by hand like this.\r\n\r\n```\r\nsearch (term: string) {\r\n    var params = new URLSearchParams()\r\n    params.set('action', 'opensearch');\r\n    params.set('search', term);\r\n    params.set('format', 'json');\r\n    return this.jsonp.get('http://en.wikipedia.org/w/api.php?callback=JSONP_CALLBACK', {\r\n      search: params\r\n    });\r\n  }\r\n```\r\n\r\nI think we should improve ergonomics here so that one can write just this.\r\n\r\n```\r\nsearch (term: string) {\r\n    return this.jsonp.get('http://en.wikipedia.org/w/api.php?callback=JSONP_CALLBACK', {\r\n      search: {\r\n        action: 'opensearch',\r\n        search: term,\r\n        format: 'json'\r\n      }\r\n    });\r\n  }\r\n```\r\n\r\n/cc @jeffbcross @robwormald "}}