Gist 89f2cb981924f2b2ad1b68db99a087af
✓ Published0🌍 Public
CCarlos-Augusto
Last edited Nov 4, 2020
Created on Nov 4, 2020
This example demonstrates a secure HTTP POST request that sends a small JSON payload containing a message, an ID, and a timestamp to a local server endpoint. The Python script builds the request using the `requests` library, formats the data with `json.dumps` (using compact separators and sorted keys), and includes custom authentication headers (`x-pk` and `x-pass`). The server responds with an encrypted string, which the script prints alongside the original data and formatted payload for verification.
AI-generated description