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

Added PUT Request to HTTP Client #2310

Merged
merged 2 commits into from
Jul 26, 2016
Merged

Conversation

fdesoye
Copy link
Contributor

@fdesoye fdesoye commented Jul 21, 2016

Added HTTP Put in order to use some HTTP APIs.

@codecov-io
Copy link

codecov-io commented Jul 21, 2016

Current coverage is 27.62% (diff: 100%)

Merging #2310 into master will not change coverage

@@             master      #2310   diff @@
==========================================
  Files            20         20          
  Lines          3656       3656          
  Methods         335        335          
  Messages          0          0          
  Branches        678        678          
==========================================
  Hits           1010       1010          
  Misses         2468       2468          
  Partials        178        178          

Powered by Codecov. Last update 7900132...7647078

@igrr igrr merged commit 3fc3e9a into esp8266:master Jul 26, 2016
@villaocho
Copy link

@fdesoye Could you please add an example of the PUT command.
I'm having issues replicating this command :
curl --header "Content-Type: text/plain" --request PUT --data "10" http://192.168.1.200:8080/rest/items/HA_Temperature_CuartoPpal/state

With :

HTTPClient http; http.begin("http://192.168.1.200:8080/rest/items/HA_Temperature_CuartoPpal/state"); http.addHeader("Content-Type", "text/plain"); int httpCode = http.PUT("10"); http.end();

Brings error 405.
Any thoughts?

@fdesoye
Copy link
Contributor Author

fdesoye commented Oct 12, 2016

@villaocho, sorry for not answering earlier. The put method had been pretty much copied from the post. Do you have a way to see on server side what has been sent? Like server logs or a tcpdump? That's how I would debug it.

@fdesoye fdesoye deleted the AddPutToHttpClient branch October 12, 2016 20:08
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.

4 participants