{"action":"opened","issue":{"url":"https://api.github.com/repos/Netflix/feign/issues/372","repository_url":"https://api.github.com/repos/Netflix/feign","labels_url":"https://api.github.com/repos/Netflix/feign/issues/372/labels{/name}","comments_url":"https://api.github.com/repos/Netflix/feign/issues/372/comments","events_url":"https://api.github.com/repos/Netflix/feign/issues/372/events","html_url":"https://github.com/Netflix/feign/issues/372","id":146367938,"number":372,"title":"Method to remove extra headers sent by feign","user":{"login":"ADeane6","id":5058093,"avatar_url":"https://avatars.githubusercontent.com/u/5058093?v=3","gravatar_id":"","url":"https://api.github.com/users/ADeane6","html_url":"https://github.com/ADeane6","followers_url":"https://api.github.com/users/ADeane6/followers","following_url":"https://api.github.com/users/ADeane6/following{/other_user}","gists_url":"https://api.github.com/users/ADeane6/gists{/gist_id}","starred_url":"https://api.github.com/users/ADeane6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ADeane6/subscriptions","organizations_url":"https://api.github.com/users/ADeane6/orgs","repos_url":"https://api.github.com/users/ADeane6/repos","events_url":"https://api.github.com/users/ADeane6/events{/privacy}","received_events_url":"https://api.github.com/users/ADeane6/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-06T16:36:24Z","updated_at":"2016-04-06T16:36:24Z","closed_at":null,"body":"I'm running feign in spring with spring security when calling the endpoint which in-turn calls a service which uses feign Gson\r\n\r\nEndPoint:\r\n\r\n     @ApiOperation(value = \"Cisco 1000v\", notes = \"Used with Nexus 1000v to Get configuration\")\r\n     @RequestMapping(value = \"/cisco\", method = RequestMethod.GET)\r\n    public String getCisco(\r\n             @ApiParam(value = \"Function to apply to switch\", required = true)   @RequestParam(value=\"Function\") String function,\r\n             @ApiParam(value = \"Hostname of device\", required = true) @RequestParam(value=\"host\")  String hostname,\r\n             @ApiParam(value = \"Username for device login\", required = true) @RequestParam(value=\"user\") String username,\r\n             @ApiParam(value = \"Password of device\", required = true) @RequestParam(value=\"pass\")   String password) throws IOException, SAXException, ParserConfigurationException {\r\n\r\n        CiscoNexus service = new CiscoNexus(hostname, username, password);\r\n        if (function.equals(\"port-profile\")) {\r\n            return service.getPort();`\r\n\r\nService:\r\n\r\n    public class CiscoNexus {\r\n    \r\n    private final String hostname, username, password;\r\n\r\n    public CiscoNexus(String hostname, String username, String password) {\r\n        this.hostname = hostname;\r\n        this.username = username;\r\n        this.password = password;\r\n    }\r\n    public String getPort() {\r\n        PortProfiles ports = Feign.builder()\r\n                .decoder(new GsonDecoder())\r\n                .encoder(new GsonEncoder())\r\n                .target(PortProfiles.class, \"http://\" + username + \":\" + password + \"@\" + hostname);\r\n\r\n        System.out.println(\"Getting Port Profiles...\");\r\n        ports.get();\r\n        return ports.get();\r\n    }\r\n\r\n    interface PortProfiles {\r\n        @RequestLine(\"GET /api/port-profile\")\r\n        @Headers(\"Accept: application/json\")\r\n        String get();\r\n    }\r\n\r\nAs I'm using spring security when I call the endpoint I have to add an auth header, but it seems feign keeps the header and sends it on to the target which doesn't respond correctly because of it, is this something that can be avoided?"}}