Multiple libraries were found for "ESP8266HTTPClient.h"
Used: C:\Users\UTILISATEUR\Documents\Arduino\libraries\ESP8266HTTPClient
Not used: C:\Users\UTILISATEUR\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\libraries\ESP8266HTTPClient
exit status 1
c:\Users\UTILISATEUR\Documents\Arduino\libraries\ESP8266HTTPClient\src\ESP8266HTTPClient.cpp:29:23: fatal error: StreamDev.h: No such file or directory
#include <StreamDev.h>
^
compilation terminated.
exit status 1
Compilation error: exit status 1
/**
* ESP8266HTTPClient.cpp
*
* Created on: 02.11.2015
*
* Copyright (c) 2015 Markus Sattler. All rights reserved.
* This file is part of the ESP8266HTTPClient for Arduino.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#include <Arduino.h>
#include <coredecls.h>
#include "ESP8266HTTPClient.h"
#include <ESP8266WiFi.h>
#include <StreamDev.h>
#include <base64.h>
// per https://github.com/esp8266/Arduino/issues/8231
// make sure HTTPClient can be utilized as a movable class member
static_assert(std::is_default_constructible_v<HTTPClient>, "");
static_assert(!std::is_copy_constructible_v<HTTPClient>, "");
static_assert(std::is_move_constructible_v<HTTPClient>, "");
static_assert(std::is_move_assignable_v<HTTPClient>, "");
static const char defaultUserAgentPstr[] PROGMEM = "ESP8266HTTPClient";
const String HTTPClient::defaultUserAgent = defaultUserAgentPstr;
int HTTPClient::StreamReportToHttpClientReport (Stream::Report streamSendError)
{
switch (streamSendError)
{
case Stream::Report::TimedOut: return HTTPC_ERROR_READ_TIMEOUT;
case Stream::Report::ReadError: return HTTPC_ERROR_NO_STREAM;
case Stream::Report::WriteError: return HTTPC_ERROR_STREAM_WRITE;
case Stream::Report::ShortOperation: return HTTPC_ERROR_STREAM_WRITE;
case Stream::Report::Success: return 0;
}
return 0; // never reached, keep gcc quiet
}
void HTTPClient::clear()
{
_returnCode = 0;
_size = -1;
_headers.clear();
_location.clear();
_payload.reset();
}
i found this "C:\Users\UTILISATEUR\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\cores\esp8266\StreamDev.h" and this error now
C:\Users\UTILISATEUR\Documents\Arduino\sketch_jul19a\sketch_jul19a.ino: In function 'void loop()':
C:\Users\UTILISATEUR\Documents\Arduino\sketch_jul19a\sketch_jul19a.ino:82:15: error: call to 'HTTPClient::begin' declared with attribute error: obsolete API, use ::begin(WiFiClient, url)
82 | http.begin(httpurl);
| ~~~~~~~~~~^~~~~~~~~
Multiple libraries were found for "ESP8266HTTPClient.h"
Used: C:\Users\UTILISATEUR\Documents\Arduino\libraries\ESP8266HTTPClient
Not used: C:\Users\UTILISATEUR\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\libraries\ESP8266HTTPClient
exit status 1
Compilation error: call to 'HTTPClient::begin' declared with attribute error: obsolete API, use ::begin(WiFiClient, url)
C:\Users\UTILISATEUR\Documents\Arduino\sketch_jul19a\sketch_jul19a.ino: In function 'void loop()':
C:\Users\UTILISATEUR\Documents\Arduino\sketch_jul19a\sketch_jul19a.ino:48:18: error: 'client' was not declared in this scope; did you mean 'Client'?
48 | http.begin(client, httpurl);
| ^~~~~~
| Client
Multiple libraries were found for "ESP8266HTTPClient.h"
Used: C:\Users\UTILISATEUR\Documents\Arduino\libraries\ESP8266HTTPClient
Not used: C:\Users\UTILISATEUR\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\libraries\ESP8266HTTPClient
exit status 1
Compilation error: 'client' was not declared in this scope; did you mean 'Client'?
That is very different from the code that you originally posted. For instance, nowhere in the latest one do you declare a WiFiClient as you do in the original one so this line