Skip to content

Instantly share code, notes, and snippets.

@wehappyfew
Last active August 29, 2015 14:26
Show Gist options
  • Select an option

  • Save wehappyfew/fd3f545e2d6d0394b749 to your computer and use it in GitHub Desktop.

Select an option

Save wehappyfew/fd3f545e2d6d0394b749 to your computer and use it in GitHub Desktop.
def make_POST(live, arg1, arg2, variable_arg):
"""
"""
import requests
payload = {
"arg1_key" : arg1,
"arg2_key" : arg2
}
payload.update(
{
"some[other][selected][%s][value]" % i : i for i in range(0, answers_num-1)
}
)
r = requests.post(root + "some_URL/actions.php?action=postSomething&arg1=%s&arg2=%s" % (arg1,arg2),
data=payload)
return r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment