{"action":"closed","issue":{"url":"https://api.github.com/repos/nodemcu/nodemcu-firmware/issues/1440","repository_url":"https://api.github.com/repos/nodemcu/nodemcu-firmware","labels_url":"https://api.github.com/repos/nodemcu/nodemcu-firmware/issues/1440/labels{/name}","comments_url":"https://api.github.com/repos/nodemcu/nodemcu-firmware/issues/1440/comments","events_url":"https://api.github.com/repos/nodemcu/nodemcu-firmware/issues/1440/events","html_url":"https://github.com/nodemcu/nodemcu-firmware/issues/1440","id":169734277,"number":1440,"title":" HTTPS POST making no answer and returning -1 code","user":{"login":"vcchm","id":12870623,"avatar_url":"https://avatars.githubusercontent.com/u/12870623?v=3","gravatar_id":"","url":"https://api.github.com/users/vcchm","html_url":"https://github.com/vcchm","followers_url":"https://api.github.com/users/vcchm/followers","following_url":"https://api.github.com/users/vcchm/following{/other_user}","gists_url":"https://api.github.com/users/vcchm/gists{/gist_id}","starred_url":"https://api.github.com/users/vcchm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vcchm/subscriptions","organizations_url":"https://api.github.com/users/vcchm/orgs","repos_url":"https://api.github.com/users/vcchm/repos","events_url":"https://api.github.com/users/vcchm/events{/privacy}","received_events_url":"https://api.github.com/users/vcchm/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-06T07:18:43Z","updated_at":"2016-08-06T12:22:34Z","closed_at":"2016-08-06T12:22:34Z","body":"Trying to feed sensor data through JSON coded HTTPS POST request.\r\nWhen i'm using HTTP it works perfectly, but when i'm turning to HTTPs i'm getting a -1 code\r\nI have the same issue when i'm trying to build the request directly with net:socket - seems to be related with SSL/HTTPS implementation.\r\n\r\n### Expected behavior\r\nI'm expecting what i get with a http request using the code provided in the last section of this post\r\n\r\n```\r\n{\r\n\t\"args\": {},\r\n\t\"data\": \"[{\\\"temp\\\":123},{\\\"ozone\\\":123},{\\\"light\\\":426426}]\",\r\n\t\"files\": {},\r\n\t\"form\": {},\r\n\t\"headers\": {\r\n\t\t\"Content-Length\": \"45\",\r\n\t\t\"Content-Type\": \"application/json\",\r\n\t\t\"Host\": \"httpbin.org\",\r\n\t\t\"User-Agent\": \"ESP8266\"\r\n\t},\r\n\t\"json\": [{\r\n\t\t\"temp\": 123\r\n\t}, {\r\n\t\t\"ozone\": 123\r\n\t}, {\r\n\t\t\"light\": 426426\r\n\t}],\r\n\t\"origin\": \"xxxxx\",\r\n\t\"url\": \"https://httpbin.org/post\"\r\n}\r\n```\r\n\r\n### Actual behavior\r\n-1 error code\r\n\r\n### Test code\r\n```lua\r\ntemp=123\r\nlight=426\r\nozone=123\r\npo_string='[{\"temp\":'..temp..'},{\"ozone\":'..ozone..'},{\"light\":'..light..'426}]'\r\n\r\nhttp.post(\"https://httpbin.org/post\",\r\n  'Content-Type: application/json\\r\\n',\r\n  po_string,\r\n  function(code, data)\r\n    if (code < 0) then\r\n      print(\"HTTP request failed\"..code)\r\n    else\r\n      print(code, data)\r\n    end\r\n  end)\r\n```\r\n\r\n### NodeMCU version\r\nI used a custom-build firmware build yesterday using Marcel's online tool. I tried both master & dev, using http, crypt, net modules.\r\n\r\n### Hardware\r\nWemos D1 mini. But again works perfectly with HTTP so dont think this is an hardware issue.\r\n"}}
{"actor":{"display_login":"marcelstoer"}}