Data formats

JSON, XML, text, and CSV bodies for parser and export checks. Load a template into the create form, then adjust the response before creating an endpoint.

200text/csvGET

CSV export

Test download and parser handling with CSV rows.

Use template
View payload and cURL

Headers

none

Body

id,email,status
1,ava@example.test,active
2,ren@example.test,pending

Create with cURL

curl -i 'https://stubpoint.dev/api/endpoints' -H 'Content-Type: application/json' -d '{
  "body": "id,email,status\n1,ava@example.test,active\n2,ren@example.test,pending\n",
  "content_type": "text/csv",
  "headers": null,
  "methods": [
    "GET"
  ],
  "status": 200
}'
200application/xmlGET

XML status

Check XML parser handling with a status payload.

Use template
View payload and cURL

Headers

none

Body

<?xml version="1.0" encoding="UTF-8"?><status><ok>true</ok><source>stubpoint</source></status>

Create with cURL

curl -i 'https://stubpoint.dev/api/endpoints' -H 'Content-Type: application/json' -d '{
  "body": "\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\u003cstatus\u003e\u003cok\u003etrue\u003c/ok\u003e\u003csource\u003estubpoint\u003c/source\u003e\u003c/status\u003e",
  "content_type": "application/xml",
  "headers": null,
  "methods": [
    "GET"
  ],
  "status": 200
}'
200text/plainGET

Plain text note

Test clients that expect plain text instead of JSON.

Use template
View payload and cURL

Headers

none

Body

accepted for testing

Create with cURL

curl -i 'https://stubpoint.dev/api/endpoints' -H 'Content-Type: application/json' -d '{
  "body": "accepted for testing\n",
  "content_type": "text/plain",
  "headers": null,
  "methods": [
    "GET"
  ],
  "status": 200
}'
200text/htmlGET

HTML fragment

Check clients that render a trusted HTML fixture.

Only use HTML fixtures with content you intentionally configured.

Use template
View payload and cURL

Headers

none

Body

<section><h1>Fixture ready</h1><p>This HTML came from a Stubpoint test endpoint.</p></section>

Create with cURL

curl -i 'https://stubpoint.dev/api/endpoints' -H 'Content-Type: application/json' -d '{
  "body": "\u003csection\u003e\u003ch1\u003eFixture ready\u003c/h1\u003e\u003cp\u003eThis HTML came from a Stubpoint test endpoint.\u003c/p\u003e\u003c/section\u003e",
  "content_type": "text/html",
  "headers": null,
  "methods": [
    "GET"
  ],
  "status": 200
}'
200text/csvGET

Empty CSV export

Test empty exports that still include column headers.

Use template
View payload and cURL

Headers

none

Body

id,email,status

Create with cURL

curl -i 'https://stubpoint.dev/api/endpoints' -H 'Content-Type: application/json' -d '{
  "body": "id,email,status\n",
  "content_type": "text/csv",
  "headers": null,
  "methods": [
    "GET"
  ],
  "status": 200
}'
200text/xmlGET

Text XML feed

Check older XML consumers that expect text/xml.

Use template
View payload and cURL

Headers

none

Body

<?xml version="1.0"?><feed><entry id="1">ready</entry><entry id="2">waiting</entry></feed>

Create with cURL

curl -i 'https://stubpoint.dev/api/endpoints' -H 'Content-Type: application/json' -d '{
  "body": "\u003c?xml version=\"1.0\"?\u003e\u003cfeed\u003e\u003centry id=\"1\"\u003eready\u003c/entry\u003e\u003centry id=\"2\"\u003ewaiting\u003c/entry\u003e\u003c/feed\u003e",
  "content_type": "text/xml",
  "headers": null,
  "methods": [
    "GET"
  ],
  "status": 200
}'

Other recipe shelves