Comments (4)
I am not sure anymore that this delay is the cause of my problem. I activated LOGGING, and this is what I got from the Http Client:
HttpClient> Connecting to IP: 192.168.1.125:80
HttpClient> Start of HTTP Request.
POST /wifispark HTTP/1.0
Connection: close
Content-Length: 19
Content-Type: application/json
Accept: */*
Connection: Close
{"humidity":"43.5"}
HttpClient> End of HTTP Request.
HttpClient> Receiving TCP transaction of 85 bytes.
HTTP/1.1 200 OK
Date: Sat, 09 Apr 2016 10:54:46 GMT
Connection: close
Thank you!
HttpClient> End of TCP transaction.
HttpClient> Error: Timeout while reading response.
HttpClient> End of HTTP Response (5700ms).
HttpClient> Status Code: 200
So there surely happens something that cause a Timeout to occur. Does the HTTP server has to respond with a strictly formated body? Currently, the server only answers Thank you!
when it correctly receives a JSON object by the POST method.
from httpclient.
Hi Jean-Philippe,
We used Particle at Minut (www.minut.com) in the early prototyping days, and back then there didn't exist an HTTP Library—so I wrote this. Since moving to production we're no longer using Particle (but remain great fans!) which is why this library isn't as maintained as perhaps it should be.
There are still many users and the occasional bugfix, but for the most part discussion takes place in the Particle forums. I'd recommend posting your concerns there to get some feedback from people using this code more actively!
Cheers,
Nils
from httpclient.
I just posted on the Particle forum: HERE
from httpclient.
@yerpj did you ever figure this out? I'm experimenting with the same thing and haven't gotten any timeouts yet, but it does seem to block in general while either making the POST request or waiting for the response. I'd like to be able to continually make post requests without waiting for any kind of response
from httpclient.
Related Issues (20)
- Possible misinterpretation of empty http_request_t.hostname
- Not receiving the data from Spark core
- Error: Timeout while reading response.
- Compile error using example files HOT 1
- Turning off logging HOT 1
- calling local IPs HOT 2
- passing authorisation credential HOT 3
- 'millis' was not declared in this scope HOT 1
- Update particle.io library HOT 1
- 'atoi' was not declared in this scope HOT 1
- 'delay' was not declared in this scope HOT 5
- 'HTTP_METHOD_GET' was not declared in this scope HOT 3
- 'http_request_t' has a previous declaration as 'typedef struct http_request_t http_request_t'
- response codes not working all the time HOT 2
- Example Fails HOT 1
- build in atom into cloud
- HttpClient buffer too small HOT 1
- Race condition when no data immediately available but client disconnects
- Convert Arduino Strings to C char[] arrays to prevent memory fragmentation.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from httpclient.