Description
Hi
VSCode combine with RESTClient Extention is a very popular way to test REST endpoint, and often preffered over Postman.
Please add some sample in this repo who can be used by use the RESTClient. To contribute I give one sample here:
After open VSCode and installed RESTClient Extention
Create a file with extention .rest, example: RgsRestCalls.rest
Add the following content to the file created above:
`
# @name auth
POST https://login.bisnode.com/as/token.oauth2
Content-Type: application/x-www-form-urlencoded
grant_type=client_credentials
&client_id=[client received from D&B]
&client_secret=[secret received from D&B]
&scope=rgs-decision-test
#Test url
@baseurl = https://api.bisnode.com/decision/v3/prodtest/
POST {{baseUrl}}/company/no
Authorization: Bearer {{auth.response.body.$.access_token}}
Content-Type: application/json
{
"registrationNumber": "938591997",
"rulesetKey": "[hashed rulesetKey received from D&B]"
}
`
How to use:
First click on the "Send request" who appear above POST https://login.bisnode.com/as/token.oauth2, then after receive the access roken, ten click "Send request" who appear above POST {{baseUrl}}/company/no. You should now receive the responce.