Using POST in d3-json
✓ Published0🌍 Public
PPhilippe Rivière
Last edited Feb 11, 2018
Created on Feb 11, 2018
This example demonstrates how to send a POST request using d3-fetch and render the server’s JSON response as SVG text. The code constructs a request body with a title, body, user ID, and friends array, then posts it to the JSONPlaceholder API via `d3.json` with method and header options. Upon resolution, the returned object is stringified and displayed in monospace font on a blank SVG canvas. The visualization is minimal, focusing on the data round-trip rather than complex graphical encoding.
AI-generated descriptiond3-fetch uses the Javascript API Fetch, and can pass arguments along.
mit Licensed