14. März 2024 15:59
Connection: keep-alive
Date: Thu, 14 Mar 2024 13:52:00 GMT
Set-Cookie: xyz-usercontext=abc-client=100; path=/, XYZ_SESSIONID_DB1_100=sq3HjwW7xi7ylkfkkBooDweOpCvioseesdSObpwF_HHo%3d; path=/; HttpOnly
x-csrf-token: 4sW0WeVEFVT8UREuf7pzeQ==
XYZ-metadata-last-modified: Wed, 23 Aug 2023 09:41:11 GMT
cache-control: no-store, no-cache
dataserviceversion: 2.0
xyz-processing-info: ODataBEP=,crp=,RAL=,st=X,MedCacheHub=SHM,MedCacheBEP=SHM,codeployed=X,softstate=
xyz-server: true
xyz-perf-fesrec: 69100.000000
Response := Client.SendAsync(Request).Result;
ResponseHeaderText := Response.Headers.ToString();
RegexPattern1 := '\W*((?i)x-csrf-token:(?-i))\W*';
RegexPattern2 := '(?<=x-csrf-token:).*';
Regex := Regex.Regex(RegexPattern1);
if Regex.IsMatch(ResponseHeaderText, RegexPattern1) then
CSRF := Regex.Match(ResponseHeaderText, RegexPattern2).value.ToString()
else
CSRF := '';
Request.Headers.Add('x-csrf-token', 'fetch')