a thoughtful web.
Good ideas and conversation. No ads, no tracking.   Login or Take a Tour!
comment by bhrgunatha
bhrgunatha  ·  3203 days ago  ·  link  ·    ·  parent  ·  post: Search hubski on DuckDuckGo with !hubski

How is that implemented?

I tried to add it some time ago, but since the search bar uses POST I couldn't provide a parameterised url to search that includes the search term.

IS there some hidden api that hubski search uses?





Cedar  ·  3203 days ago  ·  link  ·  

If you inspect the search box you can see that it has a name of "q", so let's try adding that to the /search url... and it works!. POST really only hides the data from the URL, usually it can be used interchangeably unless they're doing something wacky serverside.

You can usually find the hidden stuff by rooting through the source, using a packet sniffer such as Wireshark, or even from within the browser developer tools (in this case Network > Place a search > Select Search page > Headers > Form Data). Have a good day now!

bhrgunatha  ·  3203 days ago  ·  link  ·  

    usually it can be used interchangeably unless they're doing something wacky serverside.

Well there you go, thanks. I've never tried using either on the server side before; that seems more wacky to me. Anyway I should have looked at the advanced search ;)

Cedar  ·  3203 days ago  ·  link  ·  

You'll usually only encounter GET / POST, but more modern web frameworks aim to use "RESTful" practices which additionally include PUT / PATCH / DELETE though I just found out there's actually quite a lot !