{"action":"created","issue":{"url":"https://api.github.com/repos/OpenFeign/feign/issues/424","repository_url":"https://api.github.com/repos/OpenFeign/feign","labels_url":"https://api.github.com/repos/OpenFeign/feign/issues/424/labels{/name}","comments_url":"https://api.github.com/repos/OpenFeign/feign/issues/424/comments","events_url":"https://api.github.com/repos/OpenFeign/feign/issues/424/events","html_url":"https://github.com/OpenFeign/feign/issues/424","id":168409847,"number":424,"title":"400 returning when calling elasticsearch from feign","user":{"login":"jaylucas","id":1731967,"avatar_url":"https://avatars.githubusercontent.com/u/1731967?v=3","gravatar_id":"","url":"https://api.github.com/users/jaylucas","html_url":"https://github.com/jaylucas","followers_url":"https://api.github.com/users/jaylucas/followers","following_url":"https://api.github.com/users/jaylucas/following{/other_user}","gists_url":"https://api.github.com/users/jaylucas/gists{/gist_id}","starred_url":"https://api.github.com/users/jaylucas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaylucas/subscriptions","organizations_url":"https://api.github.com/users/jaylucas/orgs","repos_url":"https://api.github.com/users/jaylucas/repos","events_url":"https://api.github.com/users/jaylucas/events{/privacy}","received_events_url":"https://api.github.com/users/jaylucas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-07-29T20:39:33Z","updated_at":"2016-08-04T18:43:10Z","closed_at":null,"body":"So I have a basic request to a locally running instance of elasticsearch\r\n\r\n        @RequestLine(\"GET /_search?q=body:{body}\")\r\n        public ElasticGetResponse getResumes(@Param(\"body\") String body);\r\n\r\nHere is what I get through the logger:\r\n\r\n    [ElasticSearchService#getResumes] ---> GET http://localhost:9200/_search?q=body%3A%7Bbody%7D HTTP/1.1\r\n    [ElasticSearchService#getResumes] Content-Length: 21\r\n    [ElasticSearchService#getResumes] \r\n    [ElasticSearchService#getResumes] {\r\n      \"body\" : \"phil\"\r\n    }\r\n    [ElasticSearchService#getResumes] ---> END HTTP (21-byte body)\r\n    [ElasticSearchService#getResumes] <--- HTTP/1.1 400 Bad Request (154ms)\r\n    [ElasticSearchService#getResumes] Content-Length: 470\r\n    [ElasticSearchService#getResumes] Content-Type: application/json; charset=UTF-8\r\n    [ElasticSearchService#getResumes] \r\n    [ElasticSearchService#getResumes] {\"error\":{\"root_cause\":    [{\"type\":\"search_parse_exception\",\"reason\":\"failed to parse search source. unknown search element [body]\",\"line\":2,\"col\":3}],\"type\":\"search_phase_execution_exception\",\"reason\":\"all shards failed\",\"phase\":\"query\",\"grouped\":true,\"failed_shards\":[{\"shard\":0,\"index\":\"1\",\"node\":\"rOGZzEghRVacdIRh_E9Wog\",\"reason\":{\"type\":\"search_parse_exception\",\"reason\":\"failed to parse search source. unknown search element [body]\",\"line\":2,\"col\":3}}]},\"status\":400}\r\n    [ElasticSearchService#getResumes] <--- END HTTP (470-byte body)\r\n\r\nNow of course I dont get the problem when I `curl` the same endpoint\r\n\r\n    curl 'http://localhost:9200/_search?q=body:phil'\r\n\r\nreturns the correct docs\r\n\r\nMy question is why does feign hate that colon? When I have `_search?q=phil` it works....\r\n"},"comment":{"url":"https://api.github.com/repos/OpenFeign/feign/issues/comments/237645468","html_url":"https://github.com/OpenFeign/feign/issues/424#issuecomment-237645468","issue_url":"https://api.github.com/repos/OpenFeign/feign/issues/424","id":237645468,"user":{"login":"adriancole","id":64215,"avatar_url":"https://avatars.githubusercontent.com/u/64215?v=3","gravatar_id":"","url":"https://api.github.com/users/adriancole","html_url":"https://github.com/adriancole","followers_url":"https://api.github.com/users/adriancole/followers","following_url":"https://api.github.com/users/adriancole/following{/other_user}","gists_url":"https://api.github.com/users/adriancole/gists{/gist_id}","starred_url":"https://api.github.com/users/adriancole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adriancole/subscriptions","organizations_url":"https://api.github.com/users/adriancole/orgs","repos_url":"https://api.github.com/users/adriancole/repos","events_url":"https://api.github.com/users/adriancole/events{/privacy}","received_events_url":"https://api.github.com/users/adriancole/received_events","type":"User","site_admin":false},"created_at":"2016-08-04T18:43:09Z","updated_at":"2016-08-04T18:43:09Z","body":"This is a bug for sure. Not sure yet which of the various recent changes caused it.\r\n\r\n```java\r\n  interface Issue424 {\r\n    @RequestLine(\"GET /_search?q=body:{body}\")\r\n    String get(@Param(\"body\") String body);\r\n  }\r\n\r\n  @Test\r\n  public void getDoesntImplyFormParams() throws Exception {\r\n    List<MethodMetadata> mds = contract.parseAndValidatateMetadata(Issue424.class);\r\n    assertThat(mds.get(0).formParams()).isEmpty();\r\n  }\r\n```"}}
{"actor":{"display_login":"adriancole"}}