Posts Tagged ‘HTTP header’

Tech Tip: Convert POST forms into GET to link directly to search results.

Monday, October 1st, 2007

Say you want to link to all clinical trials on a certain disease or using a certain treatment method. ClinicalTrials.gov has an advanced search, where you can enter your criteria. However, because the form uses the POST method to send the search query, the page URL doesn’t change and you have no way of bookmarking the resulting page. Not all search forms work like this. Google, for example, has the query in the URL, like so: http://www.google.com/search?q=post+get+url+bookmark so you can just copy and paste the URL from whatever page you’re on. It turns out that even if the form uses POST, you can often submit a GET request and get the same results. There’s even a bookmarklet that will convert the POST form to GET for you. Just click the bookmarklet on the search form page, then hit the button as usual. This time the parameters that were sent will be shown in the URL, and you can copy that URL, link to it, and it will fetch the results directly. Here’s a link to all the clinical trials being conducted on Multiple Myeloma