rdutton
rdutton
CDCloudflare Developers
Created by rdutton on 8/30/2024 in #workers-help
Alternative to Fetch API (can't add body to GET)
Thanks for your response. I had a play with the TCP sockets runtime API and was able to do some basic stuff, just receive a HTTPS response from a GET request using HTTP 1.0 (auto closed connection) - 1.1 would not close. Beyond that it started to get trickier than the time I have available.. as much as I enjoy the challenge, with limited time I opted for the lambda approach since I already have one in action.
3 replies
CDCloudflare Developers
Created by tibotiber on 8/30/2024 in #workers-help
How can we detect web request vs non-web (backend/curl/etc)?
If you use the browser developer tools (F12/inspect) click the network tab, right-click on a request and select 'copy as cURL' you can effectively paste that into your terminal to create the exact request your browser makes.. so, no there is no real way to distinguish between cURL VS someone's browser
6 replies