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

obsolete api call for client.begin #1

Open
doabigcheese opened this issue Jul 22, 2021 · 2 comments
Open

obsolete api call for client.begin #1

doabigcheese opened this issue Jul 22, 2021 · 2 comments

Comments

@doabigcheese
Copy link

C:\Users\user\Documents\Arduino\libraries\FHEM\src\FHEM.cpp: In member function 'void FHEM::PrepareClient(String)':
C:\Users\user\Documents\Arduino\libraries\FHEM\src\FHEM.cpp:83:14: error: call to 'HTTPClient::begin' declared with attribute error: obsolete API, use ::begin(WiFiClient, url)
83 | client.begin(URL);
| ~~~~~~~~~~~~^~~~~
exit status 1

localy fixed with:
on top add:
#include <WiFiClient.h>
WiFiClient wifiClient;

line 110: client.begin(wifiClient,URL);

@CharleHei
Copy link

exit status 1

Compilation error: call to 'HTTPClient::begin' declared with attribute error: obsolete API, use ::begin(WiFiClient, url)

@tutulportal
Copy link

I have fixed my code by using this:
//add this to top
#include <WiFiClient.h>
WiFiClient wifiClient;

//where find the error their:
http.begin(wifiClient, url);

Thanks to @doabigcheese for sharing 👍

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

3 participants