-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Closed
Labels
Description
I've been pulling my hair out on this, not sure if I'm doing something wrong?
I have been unable to get a swagger-ui request to include ANY type of header. My Grape API uses an API token in the header for auth, and no matter what I do I cannot get it to show up in anything. I've tried all of the api-key example code, so I must be doing SOMETHING wrong.
However, upon closer inspection, even the demo petstore app does not contain an api header in the request headers.
I'm using the readme/sample code verbatim right now -
function addApiKeyAuthorization(){
var key = encodeURIComponent($('#input_apiKey')[0].value);
if(key && key.trim() != "") {
var apiKeyAuth = new SwaggerClient.ApiKeyAuthorization("api_key", key, "query");
window.swaggerUi.api.clientAuthorizations.add("api_key", apiKeyAuth);
log("added key " + key);
}
}
How can I get a request header of "api_key: value" to show up in request headers?
