A
A
Artyom Innokentiev2016-01-30 19:50:16
Django
Artyom Innokentiev, 2016-01-30 19:50:16

What to use when sending a POST request from the server side to another server?

The task is to send a POST request from the server to another server.
Is it possible to do this with native Django tools on the back? Or would you have to use something like requests ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Peter, 2016-01-30
@artinnok

data = urllib.urlencode(queries)
req = urllib2.Request(url, data)
response = urllib2.urlopen(req)
object = response.read()
response.close()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question