Hacker News new | ask | show | jobs
by solidgoldmagik 948 days ago
tried it on a bunch of random sites (news articles, github repos, company home pages, etc) and seems to work for me.
1 comments

Please show a successful query. For example, here is a test query: curl -d POST https://api.siteview.app {"url": "https://lite.cnn.com"}
Here is another part of the response: <span class="cf-footer-item sm:block sm:mb-1">Cloudflare Ray ID: <strong class="font-semibold">8236b959ba542980</strong></span>
Note: i was running a VPN but turned it off for the experiment - thinking that something is causing a network redirect
I dont think it was the vpn. Tried again with the same command and it worked. Im guessing it was just a bit overloaded because of this post
When testing the wework link i get this message: `<title>Worker threw exception | api.siteview.app | Cloudflare</title> (more ...)`. Does curl need additional information to escape this type of response? Do you use a curl alternative?
Here is my string: curl -H 'Content-Type: application/json' -d POST https://api.siteview.app { "url": "https://wework.com" }. Do you see a problem with that request (because i am receiving the same Cloudflare message)
ChatGPT said this is the correct cURL syntax:

``` curl -X POST https://api.siteview.app -H 'Content-Type: application/json' -d '{ "url": "https://wework.com" }' ```

Got it. works well. a very useful tool.
are you passing the `content-type: application/json` header? I just now ran the wework and it worked as expected