Sometimes we might be asked to fetch the x-csrf-token value before we make a POST request. This artical shows how to fetch the x-csrf-token value in header section.

Demo in POSTMAN

We add a pair of key-value to Headers in a GET request.

Key Value
x-csrf-token fetch

postman fetch x-csrf-token

Execute the request.
Then we retrieve the return Header.
Find the x-csrf-token → VALUE.
fetch x-csrf-token

Finally, we can use this token to access other APIs.

最後修改日期: 2021-11-29

留言

撰寫回覆或留言

發佈留言必須填寫的電子郵件地址不會公開。