Skip to content

Commit ea84d19

Browse files
committed
Fixes: #834
1 parent 23bbff5 commit ea84d19

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/meilisearch/sdk/http/CustomOkHttpClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ private Request buildRequest(HttpRequest request) throws MalformedURLException {
5656
Request.Builder builder = new Request.Builder();
5757
builder.url(url);
5858

59-
if (this.config.getApiKey() != null)
59+
if (this.config.getApiKey() != null && !this.config.getApiKey().isEmpty())
6060
builder.addHeader("Authorization", this.config.getBearerApiKey());
6161

6262
for (Map.Entry<String, String> entry : request.getHeaders().entrySet()) {

0 commit comments

Comments
 (0)