Skip to content

Samples with use of VSCode RestClient Extention #4

Open

Description

@snerting

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions