http_client
Send HTTP GET requests to network device web interfaces in GNS3 labs, and check device reachability using status checks.
Instructions
HTTP/HTTPS client for lab device web interfaces (CRUD-style)
v0.3.0: HTTP client integration for accessing device APIs and web UIs
Reverse HTTP/HTTPS proxy available at http://proxy:8023/http-proxy/:/ for external device web UI access without SSH tunnel.
Actions: - get: Send HTTP GET request to device and return response - status: Check if device web interface is reachable (HEAD request)
SSL Certificate Handling: - verify_ssl=False (default): Ignore self-signed certificates - verify_ssl=True: Verify SSL certificates (may fail for lab devices)
Reverse Proxy Alternative: Instead of using this tool, you can also access device web UIs through the reverse proxy at http://proxy:8023/http-proxy/:/
Example: http://proxy:8023/http-proxy/10.1.1.1:443/ for HTTPS device
The reverse proxy handles SSL termination and provides persistent access
without needing to make API calls.Returns: JSON response with success status, action, and results
Examples: # Get device web interface >>> http_client(action="get", url="http://10.1.1.1") { "success": true, "action": "get", "status_code": 200, "content": "...", "headers": {"content-type": "text/html", ...} }
# Check device HTTPS API reachability
>>> http_client(action="status", url="https://10.1.1.2:443", verify_ssl=False)
{
"success": true,
"action": "status",
"reachable": true,
"status_code": 200
}
# Get JSON API with custom headers
>>> http_client(
... action="get",
... url="http://10.1.1.3/api/v1/status",
... headers={"Authorization": "Bearer token123", "Accept": "application/json"}
... )
{
"success": true,
"action": "get",
"status_code": 200,
"content": "{\"status\": \"online\", ...}",
"headers": {"content-type": "application/json"}
}
# Alternative: Use reverse proxy (no tool needed)
# Access: http://proxy:8023/http-proxy/10.1.1.1:443/dashboardInput Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Target URL (http:// or https://) | |
| action | Yes | Action: 'get' (HTTP GET request), 'status' (check reachability) | |
| headers | No | Optional custom HTTP headers | |
| timeout | No | Request timeout in seconds | |
| verify_ssl | No | Verify SSL certificates |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |