Robot Framework library for beautiful API request/response HTML log cards
Project description
robotframework-requests-log
A Robot Framework library that logs HTTP API requests and responses as beautiful interactive HTML cards — with color-coded method badges, status indicators, JSON syntax highlighting, and one-click curl commands.
Features
- All HTTP methods:
GET,POST,PUT,PATCH,DELETE,HEAD,OPTIONS - Color-coded method badges and status code indicators
- JSON syntax highlighting in request/response bodies
- Collapsible request/response headers
- Auto-generated curl command with copy button
- Binary content detection (images, PDFs, audio, video)
- Body truncation at 50KB with total size shown
Installation
pip install robotframework-requests-log
Usage
*** Settings ***
Library RequestsLog
*** Test Cases ***
Test GET Request
${response}= GET https://jsonplaceholder.typicode.com/todos/1
Log ${response.status_code}
Test POST Request
${body}= Create Dictionary title=foo body=bar userId=${1}
${response}= POST https://jsonplaceholder.typicode.com/posts
... json=${body}
... expected_status=201
Keywords
| Keyword | Description |
|---|---|
GET |
Send an HTTP GET request |
POST |
Send an HTTP POST request |
PUT |
Send an HTTP PUT request |
PATCH |
Send an HTTP PATCH request |
DELETE |
Send an HTTP DELETE request |
HEAD |
Send an HTTP HEAD request |
OPTIONS |
Send an HTTP OPTIONS request |
Common Parameters
| Parameter | Description | Default |
|---|---|---|
url |
Target URL | required |
headers |
Additional headers (dict) | None |
json |
JSON body (dict) | None |
data |
Raw body | None |
params |
URL query parameters (dict) | None |
expected_status |
Assert response status code | None |
timeout |
Request timeout in seconds | 30 |
verify |
SSL certificate verification | True |
msg |
Custom error message on failure | None |
Requirements
- Python >= 3.8
- Robot Framework >= 5.0
- requests >= 2.20
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file robotframework_requests_log-1.0.0.tar.gz.
File metadata
- Download URL: robotframework_requests_log-1.0.0.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d602a90e6c23865f9e7a24d6e4f65ac850133486ba8dce7c7fbef8a85bcaa398
|
|
| MD5 |
c21ccf7e9cbcfaa64a54af28943d3816
|
|
| BLAKE2b-256 |
2d6bf0cecb0170503a748ad050c80eb79238e5937884accfca7e1fa239cb3523
|
File details
Details for the file robotframework_requests_log-1.0.0-py3-none-any.whl.
File metadata
- Download URL: robotframework_requests_log-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87107d626554bf6f77ff4a61cb67558a2472ff6f71927ee3953146d0859a8b46
|
|
| MD5 |
a801df169fc9c979d644960697339127
|
|
| BLAKE2b-256 |
7b1a0fcbd270bc96f796bcd6d494290ed027049de96fc32e9453989f95c68a57
|