Fix Java and Jetty deprecations (#10349)
Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
@@ -36,7 +36,6 @@ import org.eclipse.jetty.client.api.Request;
|
||||
import org.eclipse.jetty.client.util.FutureResponseListener;
|
||||
import org.eclipse.jetty.http.HttpHeader;
|
||||
import org.eclipse.jetty.http.HttpMethod;
|
||||
import org.eclipse.jetty.util.B64Code;
|
||||
import org.openhab.binding.telegram.internal.TelegramHandler;
|
||||
import org.openhab.core.automation.annotation.ActionInput;
|
||||
import org.openhab.core.automation.annotation.RuleAction;
|
||||
@@ -314,7 +313,8 @@ public class TelegramActions implements ThingActions {
|
||||
AuthenticationStore auth = client.getAuthenticationStore();
|
||||
URI uri = URI.create(photoURL);
|
||||
auth.addAuthenticationResult(new BasicResult(HttpHeader.AUTHORIZATION, uri,
|
||||
"Basic " + B64Code.encode(username + ":" + password, StandardCharsets.ISO_8859_1)));
|
||||
"Basic " + Base64.getEncoder().encodeToString(
|
||||
(username + ":" + password).getBytes(StandardCharsets.ISO_8859_1))));
|
||||
}
|
||||
try {
|
||||
// API has 10mb limit to jpg file size, without this it can only accept 2mb
|
||||
|
||||
Reference in New Issue
Block a user