Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add HTTP client module and documents. #886

Closed
wants to merge 33 commits into from
Closed

Conversation

vowstar
Copy link
Member

@vowstar vowstar commented Dec 29, 2015

HTTP client Demo code

-- Support HTTP and HTTPS, For example
-- HTTP POST Example with JSON header and body
http.post("http://yourtesting.url/",
           "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)

Please try! :)

vowstar and others added 30 commits December 5, 2015 13:24
Update latest code from orig
Edit version to 1.4.0, and fix espressif's SDK link.
A lot of people don't know DHT sensor lib.
BUFFER_SIZE_MAX            (1024)
@TerryE
Copy link
Collaborator

TerryE commented Dec 29, 2015

Hi. I am not sure what is happening here with the other 32 commits. It may be that I screed up something in my rebaselining. Let me check.

@vowstar
Copy link
Member Author

vowstar commented Dec 29, 2015

@TerryE I have remove all version information including how http module is build, and combine all commits to 1 now.

#887

@vowstar
Copy link
Member Author

vowstar commented Dec 29, 2015

@TerryE 25af2b9 d34ac77 50dcea3 is discarded by 5b6acee, and 5b6acee is equivalent to a8359f1 because it merge from /dev and overrite all old version. From 0380e49 to 0c8e1a2 is the process to build http module.

@TerryE
Copy link
Collaborator

TerryE commented Dec 29, 2015

@vowstar I am just trying to get our SDK 1.5-based dev stable. Do you mind if we delay merging in this for a few days? Doing both of these at the same time will get really confusing. Sorry to inconvenience you. Terry 😓

@vowstar
Copy link
Member Author

vowstar commented Dec 29, 2015

Hi @TerryE I'm very understand, it doesn't matter, SDK 1.5 is a big change, all push request may pending until 1.5 done.

@marcelstoer
Copy link
Member

I have remove all version information including how http module is build, and combine all commits to 1 now.

So, this can be closed in favor of #887, right?

@TerryE
Copy link
Collaborator

TerryE commented Dec 29, 2015

#887 is a rebase and commit so only shows the one commit, but we need to go through this carefully. However, since these has been superseded by #887, I fell that we can close this multipe-commit anologue.

@TerryE TerryE closed this Dec 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants