Skip to content
Sign upLog in
← Back to Community

What does this even do?

Profile icon
[deleted]

So I wrote this Python script. My goal is to fill out a form automatically. I wrote a script that sends an HTTP POST request to a form by using the following code:

res = requests.get('form url', headers=headers) # headers = the username and password for the form print(res)

This gives me: <Response 200>.
I'm not entirely sure what to make of this.
Was the form submitted successfully?

Answered by CosmicBear [earned 5 cycles]
View Answer
Comments
hotnewtop
Profile icon
CosmicBear

200 is the code for OK. It means that it is successful. https://en.wikipedia.org/wiki/List_of_HTTP_status_codes

Profile icon
[deleted]

Thanks,

@CosmicBear
! Also, can I see if I got signed in (since the username and password were obviously fake)? It did get submitted successfully, but then what do I do if I want to see how the form was handled?

Profile icon
CosmicBear

@saucybaka
Maybe print the content of the response back?

Profile icon
CosmicBear

What is your overall goal for this project?

Profile icon
ch1ck3n

@CosmicBear
botting

Profile icon
CosmicBear

@ch1ck3n
hmmmmm does this show up in your notifs?

Profile icon
ch1ck3n

@CosmicBear
yes

Profile icon
TheDNAHero

Response 200 literally means it was successful