We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 23bbff5 commit ea84d19Copy full SHA for ea84d19
src/main/java/com/meilisearch/sdk/http/CustomOkHttpClient.java
@@ -56,7 +56,7 @@ private Request buildRequest(HttpRequest request) throws MalformedURLException {
56
Request.Builder builder = new Request.Builder();
57
builder.url(url);
58
59
- if (this.config.getApiKey() != null)
+ if (this.config.getApiKey() != null && !this.config.getApiKey().isEmpty())
60
builder.addHeader("Authorization", this.config.getBearerApiKey());
61
62
for (Map.Entry<String, String> entry : request.getHeaders().entrySet()) {
0 commit comments