خرید بک لینک

Vote count: 0

I am trying to send an HTTP request using Django that includes a useame and password in the header in order to retrieve a token.

On my computer terminal I do the following command and it works properly:

http POST 127.0.0.1:8000/api-token-auth/ useame='admin' password='whatever'

I am trying to do this with Retrofit:

@Headers("useame='admin' password='whatever'")
@POST("/api-token-auth")
Call<TokenJSON> getToken();

However I am presented with the error:

@Headers value must be in the form "Name: Value"

Is there a correct way to format this header?

asked 46 secs ago

برچسب: نویسنده: استخدام کار تاريخ: پنجشنبه 17 تير 1395 ساعت: 11:34

صفحه بندی