How do you get Django to make a RESTful call?

后端 未结 3 1272
感动是毒
感动是毒 2020-12-24 08:11

Note: I\'m not trying to provide a RESTful api, I\'m trying to call one.

def index( request, *args, **kwargs ):
    context = {}
    context[\'some_json\'] =         


        
3条回答
  •  遥遥无期
    2020-12-24 08:24

    Use the requests library. Here is some discussion on it and I did a talk on "Consuming Web APIs with Python" at PyOhio that you might find interesting or helpful

    • Video.
    • Slides.
    • Code.

提交回复
热议问题