Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Samples with use of VSCode RestClient Extention #4

Open
snerting opened this issue Sep 19, 2022 · 0 comments
Open

Samples with use of VSCode RestClient Extention #4

snerting opened this issue Sep 19, 2022 · 0 comments

Comments

@snerting
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant