Request Data
<script type="edgeside/request-data" ...>
Produces data from the original http request, and from Cloudflare.
Attributes
| Name |
Description |
Required? |
| data-edgeside-output |
specifies a key under which it should output data |
yes |
Element content
Empty.
Examples
example1 - Use Request Data
We use the Request Data element to ask for information gathered from the user's HTTP request. We dump the output to the screen using the Debug element. Note that the information available can vary depending on the environment the edgeside code is running in. (In wrangler preview for example, be aware that cloudflare information will not be available.)
<script type="edgeside/request-data"
data-edgeside-output="requestData">
</script>
<script type="edgeside/debug"
data-edgeside-input="requestData">
</script>
Live Results:
{"url":"https://docs.edgeside.org/elements/request-data/","headers":{"accept":"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8","accept-encoding":"gzip, br","accept-language":"en-US,en;q=0.5","cf-connecting-ip":"18.97.14.81","cf-ipcountry":"US","cf-ray":"9c36d29eb9a1c988","cf-visitor":"{\"scheme\":\"https\"}","connection":"Keep-Alive","host":"docs.edgeside.org","if-modified-since":"Sun, 05 Oct 2025 19:41:25 GMT","user-agent":"CCBot/2.0 (https://commoncrawl.org/faq/)","x-forwarded-proto":"https","x-real-ip":"18.97.14.81"},"cf":{"httpProtocol":"HTTP/2","clientAcceptEncoding":"gzip, br","requestPriority":"weight=16;exclusive=0;group=0;group-weight=0","edgeRequestKeepAliveStatus":1,"requestHeaderNames":{},"clientTcpRtt":1,"colo":"IAD","asn":14618,"asOrganization":"Amazon Technologies Inc.","country":"US","isEUCountry":false,"city":"Ashburn","continent":"NA","region":"Virginia","regionCode":"VA","timezone":"America/New_York","longitude":"-77.48749","latitude":"39.04372","postalCode":"20147","metroCode":"511","tlsVersion":"TLSv1.3","tlsCipher":"AEAD-AES256-GCM-SHA384","tlsClientRandom":"aE+Jpc9RLaJTvfKXEyIuCm62sPPTwwsSU/NkP2iMlos=","tlsClientCiphersSha1":"9JLMeW81PicKzq3SuFHq04Cfyu0=","tlsClientExtensionsSha1":"K355KIywMpEr9aBWe+AbB/fc9mY=","tlsClientExtensionsSha1Le":"W2+OJIuumAUzXTyfivwdhkFkr5A=","tlsExportedAuthenticator":{"clientHandshake":"14bc645355660c79f9d2d188f212dee8748d2aa7ee7ba255f11b1e3db46e41cf3ff00e1142559790238c9626049cdebb","serverHandshake":"1ef989b2f4c99ebbc3ba583517ee22940d80f154632979e0486b861278e92d23a8c9cbd6252492fcbebca816c66ff227","clientFinished":"2046737ce6f323ab93dc77e90702de185f9608ed45810acc933d84eb069fbaf8bb44293208a9edb5e25c39529da297da","serverFinished":"c58b80e0ac4f122869590b38f580efb3ee6ebc6cac96cc0d872830b28ed67661302329be0b9d1f680af3f35d8d0575b0"},"tlsClientHelloLength":"355","tlsClientAuth":{"certPresented":"0","certVerified":"NONE","certRevoked":"0","certIssuerDN":"","certSubjectDN":"","certIssuerDNRFC2253":"","certSubjectDNRFC2253":"","certIssuerDNLegacy":"","certSubjectDNLegacy":"","certSerial":"","certIssuerSerial":"","certSKI":"","certIssuerSKI":"","certFingerprintSHA1":"","certFingerprintSHA256":"","certNotBefore":"","certNotAfter":""},"verifiedBotCategory":"","botManagement":{"corporateProxy":false,"verifiedBot":false,"jsDetection":{"passed":false},"staticResource":false,"detectionIds":{},"score":99}},"method":"GET"}
Live Results (Source):