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
42036802
Commit
42036802
authored
Apr 22, 2019
by
mucek4
Committed by
Arnim Läuger
Apr 22, 2019
Browse files
Fixed http.post() example (#2734)
parent
c55ef29a
Changes
1
Hide whitespace changes
Inline
Side-by-side
docs/modules/http.md
View file @
42036802
...
@@ -237,7 +237,7 @@ headers = {
...
@@ -237,7 +237,7 @@ headers = {
[
"Content-Type"
]
=
"application/json"
,
[
"Content-Type"
]
=
"application/json"
,
}
}
body
=
'{"hello":"world"}'
body
=
'{"hello":"world"}'
http
.
post
(
"http://httpbin.org/post"
,
headers
,
body
,
http
.
post
(
"http://httpbin.org/post"
,
{
headers
=
headers
}
,
body
,
function
(
code
,
data
)
function
(
code
,
data
)
if
(
code
<
0
)
then
if
(
code
<
0
)
then
print
(
"HTTP request failed"
)
print
(
"HTTP request failed"
)
...
...
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