How to Perform a HTTP Post "directly" in Python
Question: I do not know much about the difference between a HTTP Get and a HTTP Post so
I am hoping to get some information from those more knowledgeable then me.

I have written the following code:

    
    
    <form action="https://na.leagueoflegends.com/user/login" method="post">
        <input name="name" type="text" value="MYACCOUNTLOGINUSERNAME">
        <input name="pass" type="password" value="PASSWORD">
        <input name="form_id" id="edit-user-login" value="user_login">
        <input class="login_button" value="Submit" type="submit" style="width:100px">            
    </form>
    

When I pass my actual username and password to the form and click the submit
button I will be properly logged into the website.

However, when I change method from POST to GET it returns the following:
[https://na.leagueoflegends.com/user/login?name=MYACCOUNTLOGINUSERNAME&pass=PASSWORD&form_id=user_login](https://na.leagueoflegends.com/user/login?name=MYACCOUNTLOGINUSERNAME&pass=PASSWORD&form_id=user_login)
and when I click this link it does not log me in.

My question is, is it possible to do a "direct" POST via Python where I do not
have to create a form but instead I can just open a URL that contains the
proper parameters to log me in and POST them to the server?

Thank you in advance for your knowledge, suggestions, and/or answers.


Answer: The most sophisticated library to use for this purpose is probably
[requests](http://docs.python-requests.org/en/latest/index.html)

    
    
    >>> import requests
    >>> response = requests.post(... your args here ...)
    

Cf. the documentation of [requests.post](http://docs.python-
requests.org/en/latest/api/#requests.post).

