我想從響應頭中提取值並將它們存儲爲字符串,並最終使用某些值進行斷言。從我想提取的以下Reponse標題* Set-Cookie:id = xxxxxx-xxxxxxx-xxxxxx;並存儲它。我正在使用Rest Assured。謝謝!如何從Response Headers中提取值並使用Rest Assured進行斷言?
響應頭 *緩存控制:無緩存,無店鋪,必重新驗證 *連接:保持活躍 *的Content-Length:108 *內容類型:圖像/ PNG *日期:星期三,2017年3月22日十三時十九分51秒GMT *過期:0 *雜注:無緩存 *服務器:nginx/1.4.6(Ubuntu的) *設置Cookie:AWSELB = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX; PATH = /; DOMAIN = .xxxx.xxxxx.com; MAX-AGE = 3600; VERSION = 1 * Set-Cookie:id = xxxxxx-xxxxxxx-xxxxxx;版本= 1;路徑= /;域= .xxxx.xxxxx.com; Max-Age = 157680000 * Set-Cookie:Session = xxxx-xxxxxx-xxxxxx-xxxxx;版本= 1;路徑= /;域= .xxxxx.xxxxxx.com;最大年齡= 3600 * X供電-通過:XXXXXXXX/1 * X-機器人-標籤:NOINDEX,nofollow的