How to test REST API using Chrome's extension “Advanced Rest Client”

后端 未结 8 1145
我寻月下人不归
我寻月下人不归 2020-12-04 08:28

Following the instructions at the link below, I successfully built a REST API for my Django application: http://django-rest-framework.org/tutorial/quickstart.

I can

8条回答
  •  时光说笑
    2020-12-04 08:58

    in the header section you have to write

    Authorization: Basic aG9sY67890vbGNpbQ==

    where string after basic is the 64bit encoding value of your username:password. php example of getting the header values is: echo "Authorization: Basic " . base64_encode("myUser:myPassword");

    n.b: I assumed your authentication method as basic. which can be different as well.

提交回复
热议问题