Git Product home page Git Product logo

httpclient's People

Contributors

alexanderdean avatar apollon77 avatar colagrosso avatar hex705 avatar interactive-matter avatar ppicazo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

httpclient's Issues

setup function is executed many times

If I put the next line: client.closeStream(result);, the "setup" function is executed many times!... and when I don't close the stream (I mean, when I don't put that piece of code), setup goes fine... but a few minutes more, I cannot connect with the server.

here is my code:

FILE* result = client.postURI(uri, NULL, data, header );
//int returnCode = client.getLastReturnCode();
if (result != NULL) {
client.closeStream(result); // <--- that line is the problem.
Serial.println("sent");
}

that code is in the loop function.

Hope can help me

Library cant be added

Hi, i want to use your library but it just cant be compile or verified, I have added the library through sketch->add .zip and it is well under C:\Users\Dan\Documents\Arduino\libraries\HTTPClient-master, and include HTTPClient.h in the code, what could be the problem? am using arduino 1.6.7. I get the error HTTPClient does not name a client.

Read and use "Content-Length"

In my eyes it can be helpful especially for downloading files from HTTP to read "Content-length" out of the Header while skipping it and make it available like the Return Code. So it can be used to check the read content bytes after downloading it

Bug in skipHeaders make skipping work only once

Hi,

I was wondering why the headers were skipped correctly for the very first getURL call, but for all subsequent calls only the "HTTP/1.1 $Statucode" part is removed.
After searching a long time I found the problem:

In "skipHeaders" the both variables inByte und lastByte are declared "static" and first set to 0.
Then it is checked that both variables are not "/n" together.
This is the case for the first run (because they are initialized as 0.
So it works for the first URI.

For the second URI the values are preserved and so are both "/n" initially, so the while loop is never entered ... because of this no header is removed from all subsequent URIs ...

When removing the "static" everything works much better :-)

cant read stream returned by postURI

if I uncomment the section that reads the servers response, it crashes the Arduino Mega 2560. I'd really like to be able to read the page returned by the server.
my code:

HTTPClient hclient(serverName,(uint8_t )uint8_serverIP);
f1=hclient.postURI(urlbuf, NULL, databuf, headers );
/

char cc;
while((cc = fgetc(f1)) != EOF)
{
Serial.print(cc);
}
*/
int retcode=hclient.getLastReturnCode();

Rework to support different "Client"-types?!

Hi,

this library is specific for EthernetClient. In another fork someone adopted it to WifiClient and there is a other issue here to support GSMClient.
I also need Ethernet für one project and Wifi for another and so I would wish myself more flexibility

So my idea would be to change the design of the class and have the option to set the used "Client" in constructor. Therefor it would be needed to remove the interitance from EthernetClient and replace by a member variable for the used client instance.
Is there any real reason why it is interited at the moment?

Would this be something you would be interested in to work on or should I do it as my own fork?

some very strange numbers from getLastReturnCode()

Also, I seem to be getting some very strange numbers from getLastReturnCode(). The debugging prints show status 200, but getLastReturnCode is giving me varying numbers, even negative numbers:
1300
513
2
512
-236
1024
etc.. There seems to be no fixed pattern

Only the first GET works?

Hi

I’ve tried this code inside loop() and it is called very 10s:

if ( tenSecs ) {
FILE* result = client.getURI(“/test/P.php”,get_parms);
if (result!=NULL) {
int returnCode = client.getLastReturnCode();
if (returnCode==200) {
Serial.println(“loop::data uploaded”);
}
else {
Serial.print(“ERROR: Server returned “);
Serial.println(returnCode);
}
client.closeStream(result);
}
else {
Serial.println(“ERROR::failed to connect”);
}
}

Only the first GET works. All others fail – any idea?

Unable to read "result" stream returned from postURI

I've tried using fgets, fscanf, etc... and I am unable to read the result stream from a postURI call that is successful and should (does) have data returned from the API. If you have any information or examples on how to read this stream they would be much appreciated.

Thanks,
Jason

Arduino 1.0 and library not compatible

Hi --

First, really like your your work -- especially the light triangles.

It seems that Arduino 1 and this library are incompatible. Are you working on a fix?

GSM Shield

is it possible to port this library to use GSM shield instead Ethernet?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.