Skip to content

PUT requests always returns response status was 0 #50

Description

@nohorbee

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.

Activity

  1. unwiredben commented on Feb 19, 2014

    @unwiredben
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions