{"action":"opened","issue":{"url":"https://api.github.com/repos/andrewrk/node-proxy-middleware/issues/42","labels_url":"https://api.github.com/repos/andrewrk/node-proxy-middleware/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/andrewrk/node-proxy-middleware/issues/42/comments","events_url":"https://api.github.com/repos/andrewrk/node-proxy-middleware/issues/42/events","html_url":"https://github.com/andrewrk/node-proxy-middleware/issues/42","id":104497406,"number":42,"title":"POST request non proxyed","user":{"login":"giulianoz","id":13413854,"avatar_url":"https://avatars.githubusercontent.com/u/13413854?v=3","gravatar_id":"","url":"https://api.github.com/users/giulianoz","html_url":"https://github.com/giulianoz","followers_url":"https://api.github.com/users/giulianoz/followers","following_url":"https://api.github.com/users/giulianoz/following{/other_user}","gists_url":"https://api.github.com/users/giulianoz/gists{/gist_id}","starred_url":"https://api.github.com/users/giulianoz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giulianoz/subscriptions","organizations_url":"https://api.github.com/users/giulianoz/orgs","repos_url":"https://api.github.com/users/giulianoz/repos","events_url":"https://api.github.com/users/giulianoz/events{/privacy}","received_events_url":"https://api.github.com/users/giulianoz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-02T14:47:41Z","updated_at":"2015-09-02T14:47:41Z","closed_at":null,"body":"Hi,\r\nit seems that POST requests are not proxyed correctly as I see no requests arriving on destination server. The same request works fine from chrome/postman to the destination proxy. Also get requests works fine\r\n\r\nBTW I've added this to handle the form data:\r\nvar body=req.body;\r\nif (body) {\r\n      opts.form=body\r\n    }\r\nbefore \r\n\r\nvar myReq = request(opts, function (myRes) {\r\n\r\nmy opts variable contains the following:\r\n{ protocol: 'http:',\r\n  slashes: true,\r\n  auth: null,\r\n  host: '127.0.0.1:4000',\r\n  port: '4000',\r\n  hostname: '127.0.0.1',\r\n  hash: null,\r\n  search: null,\r\n  query: null,\r\n  pathname: '/admin',\r\n  path: '/admin/test',\r\n  href: 'http://127.0.0.1:4000/admin',\r\n  method: 'POST',\r\n  headers: \r\n   { connection: 'keep-alive',\r\n     'content-length': '263',\r\n     'cache-control': 'no-cache',\r\n     origin: 'chrome-extension://fdmmgilgnpjigdojojpjoooidkmcomcm',\r\n     'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.78 Safari/537.36',\r\n     'content-type': 'application/x-www-form-urlencoded',\r\n     accept: '*/*',\r\n     'accept-encoding': 'gzip, deflate',\r\n     'accept-language': 'it-IT,it;q=0.8,en-US;q=0.6,en;q=0.4',\r\n     cookie: ...' },\r\n  form: \r\n   { key1: 'value1' } }\r\n\r\ndo you have any idea about that ?\r\n\r\nthanks\r\n\r\ngiuliano"}}