Skip to content

Example Fails #34

@Choco31415

Description

@Choco31415

When I tried out the example through Particle's web IDE, I got this output:

Application> Start of Loop.
Application> Response status: 403
Application> HTTP Response Body:

There is no response body. curl returns a valid response, so the connection is not the issue.

After some debugging, I found out that timeapi.org expects a "User-Agent" field in the Http request. Altering the example to this...

http_header_t headers[] = {
{ "Accept" , "*/*"},
{ "User-Agent" , "A user agent."},
{ NULL, NULL }
};'

...gives output:

Application> Start of Loop.
Application> Response status: 200
Application> HTTP Response Body: 2016-12-22T18:41:00+00:00

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