← Back to Home

Random Bytes

/bytes/:n
Returns n random bytes.

Parameters

n path
Number of bytes to generate

Examples

curl
curl https://tcpdata.com/bytes/100
JavaScript (fetch)
fetch('https://tcpdata.com/bytes/100')
  .then(res => res.arrayBuffer())
  .then(data => console.log(data.byteLength));
Python (requests)
import requests

response = requests.get('https://tcpdata.com/bytes/100')
print(len(response.content))