API Request Copier
Right-click a Spring controller method and get a ready-to-run cURL command.
No running application, no copying paths by hand, no guessing JSON bodies.

Get started in 3 steps
- Open a Java file with a Spring controller (wait until the Java status bar item says the project is ready).
- Put the cursor in a method — or select a whole class.
- Right-click → Copy Request → Copy as cURL (Bash). Paste it in a terminal and run it.
Other formats: cURL for PowerShell or CMD, .http file, Postman Collection, JavaScript fetch and Axios.
Find an endpoint from a URL
Got a URL from a log, the browser or a bug report? Run API Request Copier: Search Endpoint (Command Palette, or right-click → Copy Request → Search Endpoint) and paste it:
http://localhost:8080/api/orders/42/items?page=2

The matching controller method is listed first — press Enter to open it, or click the copy icon to copy its request. Path variables ({id}), gateway prefixes (/order-service/api/...), GET /path and plain keywords all work. A URL on the clipboard is filled in automatically.
Browse every endpoint
The API Endpoints view in the Explorer lists every route in your workspace, grouped by class. Use the filter button to narrow it down by URL, path or keyword; click a route to open its method, or the copy icon to copy its request.

What it understands
@RestController, @RequestMapping, @GetMapping / @PostMapping / …, composed annotations and inherited interface mappings.
- OpenFeign
@FeignClient (its path and literal url) and Spring 6 HTTP interfaces (@HttpExchange, @GetExchange…).
- Path variables, query parameters, headers, cookies,
consumes / produces.
- Request bodies built from your DTOs: nested objects, collections, generics, records, enums and Jackson names (
@JsonProperty, @JsonIgnore).
- Forms, multipart file uploads with JSON parts, plain text and binary bodies.
- JSON-RPC (jsonrpc4j by default; custom annotations configurable): named or positional parameters, notifications and batches.
Preview, environments and authentication
- Preview / Edit Request lets you change the URL, query, headers, cookies and body before copying.
- Define environments in Settings (
requestCopier.environments, e.g. local, test, staging) and switch the active one with requestCopier.environment.
- Add a temporary Bearer or Basic token in Preview. It is only used for that copy and is never saved.
- Values the extension cannot know (for example a business ID) get sample values. Turn on
requestCopier.previewOnWarnings to open Preview automatically when something needs a look.
Requirements
Feedback
Found a problem or have an idea? Run API Request Copier: Feedback (or right-click → Copy Request → Feedback) — it opens a prefilled form at hi-mamba/feedback. Please don't paste company code there; issues are public.
Privacy
Everything runs locally inside VS Code's Java language server. Your source code and requests are never uploaded, and generated commands are only copied — never executed. A local copy counter (used once, to ask for a review after 20 copies) is stored only in VS Code's local storage.
Settings
Search for API Request Copier in Settings: environments, application path prefix, protocol (automatic / Spring MVC / JSON-RPC), JSON-RPC endpoint and annotation names, and interface language (14 languages, follows your system by default).
Tips
- Windows: the PowerShell and CMD formats call
curl.exe with UTF-8 safe arguments. For non-ASCII file paths in Bash, use a Unicode-capable cURL.
fetch / Axios file uploads expect a selectFile(path) helper in your environment; browsers forbid some headers such as Cookie — use cURL, .http or Postman for those.
Also available for IntelliJ IDEA (Community and Ultimate).
Enjoy it? Follow hi-mamba on GitHub for more developer tools.