Skip to content

Sending POST to HTTPS results on "Could not create a secure connection" #1991

Answered by Hiranus
Hiranus asked this question in Q&A
Discussion options

You must be logged in to vote

After some fiddling around with the code I got it to work. But I could swear that I tried it earlier and it didn't work... anyway, thanks for your help guys. SSL for HTTPS certificate was also a thing, so I will have to solve that at a later date, but for now I'll go with HTTP.

local header = {Accept = "*/*", ["Content-Type"] = "application/json"}
local rs = peripheral.wrap("bottom")
local rsItems = rs.listItems()
body = textutils.serializeJSON(rsItems[1])
http.post("http://localhost:32775/WeatherForecast",body,header).close()

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@SquidDev
Comment options

@Hiranus
Comment options

@fatboychummy
Comment options

@Hiranus
Comment options

Answer selected by Hiranus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants