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

PUT requests always returns response status was 0 #50

Open
nohorbee opened this issue Feb 17, 2014 · 1 comment
Open

PUT requests always returns response status was 0 #50

nohorbee opened this issue Feb 17, 2014 · 1 comment

Comments

@nohorbee
Copy link

I'm using Webduino library for implementing a REST API, and while coding and testing, I realized that, when submitting a request by using PUT verb, the application fails. If I just change the code to put it into a different verb (such as PATCH) everything is working properly.

I've went through the library code and there is no visible error (followed the execution by printing with Serial and everything looks good), but I'm getting the following message:

Could not get any response
This seems to be like an error connecting to http://172.16.20.251/servo. The response status was 0.
Check out the W3C XMLHttpRequest Level 2 spec for more details about when this happens.

(using Postman chrome extension).

I tried other tools to generate the put requests and it's failing equally.

@unwiredben
Copy link
Collaborator

Hmmm, it's very possible that we're not implementing PUT correctly. One
issue is that Webduino only implements a HTTP/1.0 server due to not having
the resources on the ATMega chip to handle some of the requirements of 1.1.
Looking at the HTTP 1.0 RFC, there's no real differences between POST and
PUT other than how the application running the server handles the verb
internally.

To figure this out, I'll probably need to use curl's verbose mode to look
at what's sent and what's received back. I don't have any support in the
library right now for receiving an upload of non-form data over HTTP, so
maybe that's part of the issue.

On Mon, Feb 17, 2014 at 7:23 AM, Norberto L. Herz
[email protected]:

I'm using Webduino library for implementing a REST API, and while coding
and testing, I realized that, when submitting a request by using PUT verb,
the application fails. If I just change the code to put it into a different
verb (such as PATCH) everything is working properly.

I've went through the library code and there is no visible error (followed
the execution by printing with Serial and everything looks good), but I'm
getting the following message:

Could not get any response
This seems to be like an error connecting to http://172.16.20.251/servo.
The response status was 0.
Check out the W3C XMLHttpRequest Level 2 spec for more details about when
this happens.

(using Postman chrome extension).

I tried other tools to generate the put requests and it's failing equally.

Reply to this email directly or view it on GitHubhttps://github.com//issues/50
.

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

No branches or pull requests

2 participants