← Back to Home

Share Request

/share
Share request data for later replay. Data is stored for 7 days and accessible via a unique ID. Perfect for sharing API responses, debugging data, or collaboration.
Try it now

Parameters

Body body
Any JSON data to share

Examples

curl
# Step 1: Share some data
curl -X POST https://tcpdata.com/share \
  -H "Content-Type: application/json" \
  -d '{"api":"GitHub","user":"octocat","repos":42}'

# Returns:
# {
#   "id": "abc12345",
#   "url": "https://tcpdata.com/replay/abc12345",
#   "expires_in": "7 days"
# }

# Step 2: Replay/retrieve the shared data
curl https://tcpdata.com/replay/abc12345
JavaScript (fetch)
// Share data
const shareResponse = await fetch('https://tcpdata.com/share', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    api: 'GitHub',
    user: 'octocat',
    repos: 42
  })
});
const { id, url } = await shareResponse.json();

// Later, replay the data
const data = await fetch(url).then(r => r.json());
console.log(data);
Python (requests)
import requests

# Share data
response = requests.post('https://tcpdata.com/share', json={
    'api': 'GitHub',
    'user': 'octocat',
    'repos': 42
})
share = response.json()
print(f"Share URL: {share['url']}")

# Later, replay the data
data = requests.get(share['url']).json()
print(data)