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

undefined reference to HttpClient::finishRequest() #40

Open
weberc2 opened this issue Aug 29, 2023 · 4 comments
Open

undefined reference to HttpClient::finishRequest() #40

weberc2 opened this issue Aug 29, 2023 · 4 comments

Comments

@weberc2
Copy link

weberc2 commented Aug 29, 2023

v2.2.0 - It looks like finishRequest() is declared in the header file but not implemented anywhere. Seems related to #24, but that ticket contained no information for working around this issue.

@joeyparrish
Copy link

I'm seeing this as well.

@joeyparrish
Copy link

joeyparrish commented May 3, 2024

EDIT: corrected my initial statement, which involved a protected method. Fixed to use the public one.

I spent some time in the source code figuring this out. It looks like finishHeaders() is what we should use, or endRequest() endRequest() is the right method. The maintainer should really remove the bogus finishRequest() from the header.

If you need to send request headers, do something like this sequence:

// Tell the library you'll be sending some extra headers so it
// doesn't end the request headers automatically.
http_client.beginRequest();

// Send the GET request.
http_client.get(SERVER, PORT, PATH);

// Add headers.
http_client.sendHeader("foo", "bar");

// Finish the request.
http_client.endRequest();

@joeyparrish
Copy link

The last commit was 9 years ago, so I will assume that the author is no longer maintaining this library.

@joeyparrish
Copy link

https://github.com/arduino-libraries/ArduinoHttpClient is a fork of this, maintained as recently as 2 months ago.

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