REST API Basics
REST (Representational State Transfer) is an architectural style for building web APIs. RESTful APIs use standard HTTP methods to perform operations on resources identified by URLs. They have become the backbone of modern web and mobile applications, enabling communication between frontend clients, backend services, third-party integrations, and microservices.
Testing API endpoints is a critical part of the development process. Whether you are building a new API, integrating with a third-party service, or debugging a production issue, you need to send HTTP requests and inspect the responses. While tools like Postman and cURL are popular choices, an online API tester lets you test endpoints directly from your browser without installing anything.
Understanding HTTP Methods
HTTP defines several request methods, each with a specific semantic meaning. Here are the most common methods used in REST APIs:
GET — Retrieve a resource or collection of resources
POST — Create a new resource
PUT — Replace an existing resource entirely
PATCH — Update specific fields of an existing resource
DELETE — Remove a resource
HEAD — Same as GET but returns only headers (no body)
OPTIONS — Describe the communication options for a resourceGET and DELETE requests typically do not include a request body, while POST, PUT, and PATCH requests usually include a JSON body with the data to create or update. PulpMiner's API Tester supports all of these methods.
Working with HTTP Headers
HTTP headers carry metadata about the request or response. They are essential for authentication, content negotiation, caching, and more. Here are the most common headers you will use when testing APIs:
Content-Type: application/json
— Tells the server the request body is JSON
Authorization: Bearer <token>
— Sends an authentication token
Accept: application/json
— Tells the server you want a JSON response
X-API-Key: your-api-key
— Common custom header for API key authenticationIn the PulpMiner API Tester, you can add custom headers as key-value pairs. The tool automatically sets the Content-Type header to application/json when you provide a JSON request body.
Constructing Request Bodies
For POST, PUT, and PATCH requests, you typically need to send a request body containing the data for the resource you are creating or updating. The most common format is JSON:
// POST /api/users
{
"name": "Alice Johnson",
"email": "alice@example.com",
"role": "admin",
"preferences": {
"theme": "dark",
"notifications": true
}
}The API Tester includes a built-in JSON editor with syntax highlighting and validation. If your JSON has a syntax error, the tool will highlight it before you send the request, saving you the frustration of getting a 400 Bad Request response.
Understanding CORS Limitations
When testing APIs from a browser-based tool, you may encounter CORS (Cross-Origin Resource Sharing) errors. CORS is a security mechanism that prevents web pages from making requests to a different domain than the one that served the page. If the API server does not include the appropriate Access-Control-Allow-Origin header, the browser will block the response.
This is a browser-level restriction, not a limitation of the API itself. The same request would work fine from cURL, Postman, or a backend server. If you encounter CORS issues in the PulpMiner API Tester, it means the target API does not allow cross-origin requests from browsers. You can ask the API owner to add your origin to their CORS allowlist, or use a backend proxy to route the request.
How to Use the PulpMiner API Tester
Start by entering the full URL of the API endpoint you want to test. Select the HTTP method from the dropdown — GET, POST, PUT, PATCH, or DELETE. If needed, add custom headers using the header editor. For methods that accept a body, enter your JSON payload in the request body editor.
Click "Send" to execute the request. The tool will display the response status code, response headers, response time, and the response body formatted as JSON. You can easily inspect the response to verify that the API is behaving as expected.
Inspecting the Response
A complete API response includes several important pieces of information. The status code tells you whether the request succeeded (200, 201) or failed (400, 401, 404, 500). The response headers may include rate limit information, pagination links, or caching directives. The response body contains the actual data returned by the API.
// Example response
Status: 200 OK
Time: 142ms
Headers:
Content-Type: application/json
X-RateLimit-Remaining: 98
Body:
{
"id": 1,
"name": "Alice Johnson",
"email": "alice@example.com",
"createdAt": "2026-02-07T10:30:00Z"
}Common Testing Scenarios
Some typical API testing scenarios include verifying that authentication is working by sending a request with and without a valid token, testing validation by sending malformed data and checking that the API returns appropriate error messages, testing pagination by requesting different pages of a collection, and testing error handling by requesting non-existent resources to verify 404 responses.
The PulpMiner API Tester is perfect for these quick, exploratory tests during development. For automated test suites and CI/CD pipelines, you would typically use tools like Jest, Supertest, or Playwright.
