Go to Recording Options / HTTP properties / Advanced / Headers and add 'x-csrf-token' or select 'Record header not in list'.
Then record or regenerate the script.
Note: the header name (in web_add_header) is without the colon (:) or space. The right boundary in web_reg_save_param should be \r\n not =
web_add_header("x-csrf-token","{XCsrfToken}"");
The header looks like as follows in server response,
x-csrf-token: 0FTcidqErDFSk1hTsw0rIw==
I have tried to correlate the function as follows on a proper request,
web_reg_save_param(" XCsrfToken","LB=x-csrf-token: ","RB=\r\n","Search=Headers",LAST);
Hi,
ReplyDeleteHow to find where that header statement sholud place?