Skip to content

POST requests

buzz edited this page Mar 18, 2022 · 2 revisions

Some few websites will use POST instead of GET for their search functionality. IMDb: Link 'em all! does support POST requests. But creating those is a tad more challenging.

Determining if a website is using POST

A good way of detecting a POST request is to look at the address bar after performing a search. It will lack any search parameters (e.g. example.com?q=searchtext or example.com/search/searchtext, etc.). If the search text is not included somehow in the URL, it's most likely a POST request. To be sure, you should open your browsers Developer tools and look at the Network tab.

To make this process more clear we will look at the example of omdb.org.

  1. Open the website and access the developer tools (Ctrl+Shift+I), select the Network tab.
  2. Perform an arbitrary search on the website.
  3. Click the topmost network request and check Request Method.
    request-method

Figuring POST fields

Having determined that the website in question is really using POST, we need to figure out which fields are required for the search. The Payload tab will tell us exactly that.

payload

In this case we have a single field called search[text]. The search term we used is rembrandt.

Putting it all together

TODO

Clone this wiki locally