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:
parent
ce4b044be1
commit
98aea61a37
1 changed files with 1 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue