Source: Love Mac | Software download link: Hitchhiker for Mac
Hitchhiker is a modern API development and testing tool designed specifically for the Mac platform. With its intuitive interface, powerful features, and smooth operating experience, it helps developers efficiently design, debug, and manage HTTP/HTTPS API requests. This article provides an in-depth analysis of its core interface, complete workflow, and tips for efficient use.
I. Detailed Explanation of the Core Interface and Workspace
After launching Hitchhiker, the main interface is primarily divided into the following core areas:
- Left Navigation Bar: The top section is a tree list of projects/collections, used to organize and manage all API requests. The bottom section contains quick-switch tabs for Environment variables and History.
- Central Request Editing Area: This is the core workspace, including:
- Request Method Dropdown Menu: Select HTTP methods such as GET, POST, PUT, DELETE, etc.
- URL Address Bar: Enter the endpoint URL for the request, with support for environment variables.
- Parameter Tab Pages: Manage Query Params, Authorization, Headers, Body, etc.
- Body Editor: Supports form-data, x-www-form-urlencoded, raw (JSON, XML, Text, etc.), and features syntax highlighting and formatting.
- Script Tab: JavaScript code can be executed before the request is sent (Pre-request) and after the response is received (Test).
- Right-side Response Display Area: After sending a request, the response content is displayed here. It is divided into:
- Status Line: Displays the HTTP status code and response time.
- Response Tabs: Body (supports Pretty, Raw, and Preview views), Cookies, Headers.
- Test Results Panel: Displays the assertion results defined in the “Test” script.
- Top Toolbar: Contains global function buttons such as Send Request, Save, Import/Export, and Environment Switching.
II. Complete Workflow: From Creating a Project to Exporting
1. Create/Open a Project (Collection)
- At the top of the left sidebar, click the “…” icon to the right of the Collection name.
- Select “New Collection“.
- Enter a collection name (e.g., “My Project API”) and press Enter to confirm.
- Shortcut: Create a new request with
Command + N, but creating a collection requires manual operation.
2. Create and Configure an API Request
- Right-click on the target collection and select “Add Request“.
- In the central editing area:
- Select the request method from the dropdown menu (e.g., POST).
- Enter the address in the URL bar, for example:
{{base_url}}/api/login(using environment variables). - Switch to the Headers tab, click “Add Row”, and set
Content-Type: application/json. - Switch to the Body tab, select “raw”, and choose “JSON” from the format dropdown menu on the right.
- Enter the JSON data in the Body editor, for example:
{"username": "test", "password": "123456"}. - Click the “Save” button in the upper right corner or use
Command + Sto save the request.
3. Manage Environment Variables
- Click the “Environment” icon (globe icon) at the bottom of the left sidebar.
- Click “+” to create a new environment (e.g., “Development Environment”).
- In the key-value table, add variables, for example:
base_url–https://dev.example.com. - In the environment selector on the top toolbar, select the newly created “Development Environment”. After that,
{{base_url}}in the request URL will be automatically replaced.
4. Send Requests and View Responses
- Make sure the target request is selected, and click the blue “Send” button to the right of the URL address bar.
- Shortcut:
Command + Enter(quickly send the current request). - View the result in the response area on the right:
- Check the status code (e.g., 200 OK).
- On the “Body” tab, select the “Pretty” view to format the JSON response.
- Check the “Headers” tab to view the response header information.
5. Write test scripts (advanced)
- In the request editing area, switch to the Script tab.
- In the “Test” sub-tab, enter JavaScript code to assert the response. For example:
// Check whether the status code is 200 pm.test("Status code is 200", function () { pm.response.to.have.status(200); }); // Check whether the response JSON contains a specific field pm.test("Response has user token", function () { var jsonData = pm.response.json(); pm.expect(jsonData.token).to.be.a('string'); }); - After sending the request, the test results will automatically appear in the test results panel below the response area on the right; a green check mark indicates a pass.
6. Export data
- Click the “File” menu in the top toolbar.
- Select “Export Collection”.
- In the dialog that appears, select the collection to export.
- Choose the export format (usually Hitchhiker’s native format or the universal JSON format).
- Choose a save location and click “Export” to finish.
Note: The export feature is mainly used to back up or share collection configurations with your team; it does not include runtime environment variable data.
III. Advanced Tips for Common Features
- Batch Requests and Monitoring: You can create a folder, place multiple requests in it, then right-click the folder and select “Run” to execute all requests in sequence and view the aggregated results, which is suitable for API inspection.
- Dynamic Variables: Dynamic variables can be used in scripts, such as
{{$timestamp}}to generate a timestamp, or through the test script of the previous requestpm.environment.set("token", jsonData.token);to pass the value to an environment variable for use in subsequent requests. - Request Cloning and Comparison: Right-click a request and select “Duplicate” to quickly create a request with a similar configuration for modification and comparison testing.
- Quick Generation of Code Snippets: For an already configured request, you can use it to generate some client-side code snippets (such as cURL commands), making it convenient to combine with development documentation.
IV. Common Problems and Solutions
| Symptom | Possible Cause | Solution |
|---|---|---|
| Failed to send request, with “Network Error” or timeout | 1. Incorrect URL or server unreachable. 2. Proxy settings issue. 3. Blocked by the Mac system firewall or security software. |
1. Check the URL spelling and network connection. 2. Check the proxy settings of Hitchhiker and the system (located in the software settings). 3. Temporarily disable the firewall or security software for testing. |
Environment variable {{variable}} is not replaced |
1. The environment variable is not defined correctly. 2. The correct active environment is not selected. |
1. Check the spelling and value of the environment variable. 2. Click the environment selector in the top toolbar and confirm that you have switched to the environment where the variable is defined. |
| JSON Body format error, server returns 400 | 1. JSON syntax error (such as missing quotation marks or commas). 2. The correct Content-Type header is not set. |
1. Use the “Format” feature of the Body editor (shortcut Command + Option + F) to check the syntax.2. Make sure Content-Type: application/json is set in Headers. |
| Test script (Test) does not execute or does not display results | 1. A syntax error in the script causes interruption. 2. The test results panel is accidentally closed. |
1. Check the browser console (via “View” -> “Toggle Developer Tools”) to view script errors. 2. Look for the draggable “Test Results” bar at the bottom of the response area and expand it. |
| Request cannot be saved | The request does not belong to any collection. | Before saving, make sure a target collection is selected in the left navigation bar, or create a new collection. |
V. Keyboard Shortcuts Summary (Mac Version)
| Function | Shortcut | Description |
|---|---|---|
| New Request | Command + N |
Create a new request under the current collection |
| Save Current Request | Command + S |
Save changes to the request |
| Send Request | Command + Enter |
Send the currently edited request |
| Format JSON Body | Command + Option + F |
Beautify/format JSON content in the Raw Body |
| Toggle Fullscreen Mode | Command + Control + F |
Enter or exit the fullscreen workspace |
| Toggle Developer Tools | Command + Option + I |
Open/close the console for debugging scripts |
| Find | Command + F |
Find text in the current panel (e.g., Response Body) |
| Copy | Command + C |
Copy the selected text or request |
| Paste | Command + V |
Paste |
| Undo | Command + Z |
Undo the previous action |
| Redo | Command + Shift + Z |
Redo the undone action |
| Switch Environment | Command + E |
Quickly open the environment selection dropdown menu |
Tip: Some shortcuts may change due to software version updates. Please refer to the actual settings within the software. You can view the latest shortcut mappings through the “Help” menu or the settings page.








