Consuming a RESTful API with Django

前端 未结 2 1251

I\'m building a Django application that needs to interact with a 3rd party RESTful API, making various GETs, PUTs, etc to that resource. What I\'m looking for is a good way to

2条回答
  •  时光说笑
    2021-02-08 08:43

    Make the REST calls using the builtin urllib (a bit clunky but functional) and wrap the interface into a class, with a method for each remote call. Your class can then translate to and from native python types. That is what I'd do anyway!

提交回复
热议问题