简体   繁体   中英

How to get csrf token from get api and pass csrf token to another post api using REST Assured?

How to get csrf token from get api and pass csrf token to another post api?

I have to perform login. For this I have to pass 3 parameters:

  1. csrftoken
  2. username
  3. password

The csrftoken is received using GET https://url.com/account/login in form of response body in DOC format.

Request is :

在此输入图像描述

Response is : 在此输入图像描述

Response Header is :

在此输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM