
Security News
GitHub Actions Checkout Now Blocks Risky pull_request_target Checkouts
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.
@robinpath/api
Advanced tools
Generic REST client with named credential profiles (bearer / basic / api_key). Wraps fetch() with base-URL resolution, structured error envelopes, and download/upload helpers.
HTTP client for making requests to external APIs with profiles, auth, download/upload, and auto-JSON parsing
The api module lets you:
All functions are callable directly from RobinPath scripts with a simple, consistent API.
robinpath add @robinpath/api
1. Set up credentials
api.setAuth "github" "bearer" "ghp_xxxxxxxxxxxx"
2. Send a POST request with a JSON body
api.post "https://api.example.com/users" {"name": "Alice", "email": "alice@example.com"}
| Function | Description |
|---|---|
api.get | Send a GET request to a URL and return the response body (auto-parses JSON) |
api.post | Send a POST request with a JSON body |
api.put | Send a PUT request with a JSON body |
api.patch | Send a PATCH request with a partial JSON body |
api.delete | Send a DELETE request |
api.head | Send a HEAD request and return response headers only |
api.download | Download a file from a URL and save it to disk |
api.upload | Upload a file as multipart/form-data |
api.createProfile | Create a named API profile with base URL, default headers, and timeout |
api.setAuth | Set authentication on an existing profile |
api.setHeaders | Merge additional default headers into an existing profile |
api.request | Send a generic HTTP request with an explicit method string |
api.post "https://api.example.com/users" {"name": "Alice", "email": "alice@example.com"}
api.put "https://api.example.com/users/1" {"name": "Bob"}
api.patch "https://api.example.com/users/1" {"email": "new@example.com"}
import { RobinPath } from "@wiredwp/robinpath";
import Module from "@robinpath/api";
const rp = new RobinPath();
rp.registerModule(Module.name, Module.functions);
rp.registerModuleMeta(Module.name, Module.functionMetadata);
const result = await rp.executeScript(`
api.setAuth "github" "bearer" "ghp_xxxxxxxxxxxx"
api.post "https://api.example.com/users" {"name": "Alice", "email": "alice@example.com"}
`);
See MODULE.md for complete documentation including all parameters, return types, error handling, and advanced examples.
@robinpath/json — JSON module for complementary functionalityMIT
FAQs
Generic REST client with named credential profiles (bearer / basic / api_key). Wraps fetch() with base-URL resolution, structured error envelopes, and download/upload helpers.
The npm package @robinpath/api receives a total of 10 weekly downloads. As such, @robinpath/api popularity was classified as not popular.
We found that @robinpath/api demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.