1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-02-22 22:21:18 +00:00

Gemini: use auth header

This commit is contained in:
M66B 2024-03-28 17:48:35 +01:00
parent ce4b044be1
commit 98aea61a37

View file

@ -103,7 +103,6 @@ public class Gemini {
// https://ai.google.dev/api/rest
Uri uri = Uri.parse(getUri(context)).buildUpon()
.appendEncodedPath(path)
.appendQueryParameter("key", apikey)
.build();
Log.i("Gemini uri=" + uri);
@ -120,6 +119,7 @@ public class Gemini {
ConnectionHelper.setUserAgent(context, connection);
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("x-goog-api-key", apikey);
connection.connect();
try {