1

I know untill a couple years ago Django did not have one, as there are several questions here regarding this topic but they are all atleast two years old

How to send a POST request using django?

They mostly recommend to use python-request or urllib

My question is, does Django contains this by default now? A module to make POST/GET requests to another server, or is there still need to install external libs?

This is mostly to avoid bypassing cross domain policies in using APIs

Community
  • 1
  • 1
Mojimi
  • 2,561
  • 9
  • 52
  • 116
  • 2
    No, including such a library would be completely out of scope for Django. – knbk May 09 '17 at 20:05
  • Isn't Django scope web development? It already has so many tools that ease the flow of a web project – Mojimi May 09 '17 at 20:09
  • 2
    It is a web framework. It's used to develop the server application in the client-server architecture of HTTP. There's absolutely no reason to include HTTP client code in a server-side framework. It would only couple Django to a specific HTTP client implementation, rather than giving developers the option to choose whatever works for them in the few cases it's needed. – knbk May 09 '17 at 20:16
  • Django is a web framework, it's purpose it to receive requests and process them. I would suggest using the requests library. https://pypi.python.org/pypi/requests – wobbily_col May 09 '17 at 20:17

2 Answers2

4

Django has no built in library for making HTTP requests.
Most used python library for HTTP requests is requests which you found here. It is simple to use, works well with Django. Here are docs.

Jan Giacomelli
  • 1,299
  • 11
  • 23
1

There is also a django library called django-request library which is found in this doc django request library