2

I'm trying to make an HTTP post on this website:

https://www.colorado.gov/revenueonline/_/#2

(click Verify a Sales Tax License in the bottom right)

using wget with the following command:

wget --post-data="VIEW__=CG_LicVer
&LASTFOCUSFIELD__=
&DOC_MORAL_ID__=0
&DvfmoUb__0_0_Fdr2ZH=7777777" \
-U "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)" \
https://www.colorado.gov/revenueonline/_/#2

but it gets rejected with "ERROR 405: Method Not Allowed" which I'm assuming means they don't allow HTTP posts at all on the website. But the post code is right there!

<form name="DocumentForm" class="DocumentForm " action="." method="post" onsubmit="return false;">

Long story short how do I make a post or whatever this website is using if it isn't using http post or get to simply input a number and get back the next page's results?

Darth Android
  • 37,872
  • 5
  • 94
  • 112
user257770
  • 21
  • 1
  • 2

2 Answers2

0

From your code sample:

onsubmit="return false;"

This means that the HTML form will not be submitted by the browser when the button is clicked. Instead, there is likely some JavaScript code that listens for the button click and makes a custom network request.

Indeed, by using the DevTools Network tab, we can see that a POST request is made to https://www.colorado.gov/revenueonline/_/EventOccurred, issued by jQuery. There are several form fields in this network request: Dd-5 and Dd-6 seem to contain the username and password respectively.

It is somewhat common for HTML forms to be overridden by JavaScript in this way, so it's best to check the actual network request using DevTools to be sure.

Cadence
  • 101
  • 2
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community May 19 '23 at 00:30
0

I believe you are sending your POST to the wrong URL. It seems like the correct URL is

https://www.colorado.gov/revenueonline/_/ImportDialog

This page is not returning a 405. However, I'm not sure of the expected result.

Bell
  • 911
  • 6
  • 6