Test the Azure App Configuration REST API using Postman
To test the REST API using Postman, you'll need to include the HTTP headers required for authentication in your requests. Here's how to configure Postman for testing the REST API, generating the authentication headers automatically:
Create a new request
Add the
signRequest
function from the JavaScript authentication sample to the pre-request script for the requestAdd the following code to the end of the pre-request script. Update the access key as indicated by the TODO comment
// TODO: Replace the following placeholders with your access key var credential = "<Credential>"; // Id var secret = "<Secret>"; // Value var isBodyEmpty = pm.request.body === null || pm.request.body === undefined || pm.request.body.isEmpty(); var headers = signRequest( pm.request.url.getHost(), pm.request.method, pm.request.url.getPathWithQuery(), isBodyEmpty ? undefined : pm.request.body.toString(), credential, secret); // Add headers to the request headers.forEach(header => { pm.request.headers.upsert({key: header.name, value: header.value}); })
Send the request
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om