mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-02 23:26:12 +02:00
Gemini: use auth header
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user