Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
5f340f5f
Commit
5f340f5f
authored
Aug 10, 2016
by
Marcel Stör
Committed by
Arnim Läuger
Aug 10, 2016
Browse files
Delete http-client.lua (#1448)
parent
f1b479d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
lua_examples/http-client.lua
deleted
100644 → 0
View file @
f1b479d8
-- Support HTTP and HTTPS, For example
-- HTTP POST Example with JSON header and body
http
.
post
(
"http://somewhere.acceptjson.com/"
,
"Content-Type: application/json\r\n"
,
"{\"
hello
\
":\"
world
\
"}"
,
function
(
code
,
data
)
print
(
code
)
print
(
data
)
end
)
-- HTTPS GET Example with NULL header
http
.
get
(
"https://www.vowstar.com/nodemcu/"
,
""
,
function
(
code
,
data
)
print
(
code
)
print
(
data
)
end
)
-- You will get
-- > 200
-- hello nodemcu
-- HTTPS DELETE Example with NULL header and body
http
.
delete
(
"https://10.0.0.2:443"
,
""
,
""
,
function
(
code
,
data
)
print
(
code
)
print
(
data
)
end
)
-- HTTPS PUT Example with NULL header and body
http
.
put
(
"https://testput.somewhere/somewhereyouput.php"
,
""
,
""
,
function
(
code
,
data
)
print
(
code
)
print
(
data
)
end
)
-- HTTP RAW Request Example, use more HTTP/HTTPS request method
http
.
request
(
"http://www.apple.com:80/library/test/success.html"
,
"GET"
,
""
,
""
,
function
(
code
,
data
)
print
(
code
)
print
(
data
)
end
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment