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.
2 parents ccc93c5 + 01668db commit 4ee0ee9Copy full SHA for 4ee0ee9
subprojects/zap-clientapi/src/main/java/org/zaproxy/clientapi/core/ClientApi.java
@@ -398,6 +398,13 @@ private HttpRequest buildZapRequest(
398
}
399
sb.append('&');
400
401
+ } else if (apiKey != null && !apiKey.isEmpty()) {
402
+ // Send the API key even if there are no parameters,
403
+ // older ZAP versions might need it as (query) parameter.
404
+ sb.append('?');
405
+ sb.append(encodeQueryParam(ZAP_API_KEY_PARAM));
406
+ sb.append('=');
407
+ sb.append(encodeQueryParam(apiKey));
408
409
410
HttpRequest request = new HttpRequest(new URL(sb.toString()));
0 commit comments