liveBook · Manning

REST Client

As explained in Claude at Work

REST Client is a Visual Studio Code extension for documenting and executing HTTP requests.

REST Client is a Visual Studio Code extension that turns HTTP requests in a text file into clickable calls, with responses shown in an output window. A `.http` file can document and manually test an API, including request URLs, methods, headers, and bodies. section 5.10

Test a login flow

A login request can supply an access token for later profile and user-info requests. Include error cases, such as missing data or incorrectly formatted requests, to check API behavior. section 5.10

Listing 5.3 A REST Client file for exploring the API, generated by Claude
# Signing in

### Local-only sign-in: any email, no password, no IdP.
# @name login
POST {{host}}/api/v1/auth/dev-login
Content-Type: {{json}}

{
  "email": "ada@example.com",
  "displayName": "Ada Lovelace"
}

# Using the access token

### The signed-in user's profile.
GET {{host}}/api/v1/users/me
Authorization: Bearer {{login.response.body.$.accessToken}}

### The claims on the current token — no database read.
GET {{host}}/api/v1/auth/userinfo
Authorization: Bearer {{login.response.body.$.accessToken}}

Inspect a sample `.http` file with login, profile, and user-info requests linked by a response token. section 5.10

How Claude at Work covers it

How deep it goes
Defines the `.http` request format and demonstrates reusing a login token, without detailing extension setup.
Examples
Demonstrates login, token refresh, profile and user-info calls, plus error paths for missing data or malformed requests.
What it assumes
Assumes an API is running in Docker and a Visual Studio Code environment is available.
What you can do after
Evaluate API behavior by executing documented requests, checking responses, and reusing a login token across calls.
How it connects
Connects HTTP requests, API endpoints, access tokens, and Docker-based service testing.

This explainer was generated by Manning's knowledge graph from the text of Claude at Work. The section links point to the parts of the book it draws on.