Error asigning value to HttpHeaders

A very good mornig to everybody

I need to assign these headers to an httprequest:

xlHttpHeaders.Add('x-amz-access-token', 'Atza|IwEBIC6DIMt3xkzod938kGXbD2m9YTHeHL5cE2l7QUUrPESK2CZPVYBnoPkb7e0CMZQXxYs8C0wUAFwXsOlE-b4FOmLmlMaqGhUUeGLAyFPnMxB76tl3-vcAX9ibSasZrNY0WrsSm4Fl-v3NnV54PylTCNMEACRq53K-90CxXOQ852T0Y-hiusiCR99Be92tF_vo5UU8H9zD_zVKBQSGwmMlrBfSaaPM6eZ4W0koKunDgU6uLkElBR5A6LI6AGrNyueY0Q6QONr2FUCNWbdRRUEP4wzgD7Wittm2i7kE9qpyQzIVC44rxb1EK4_ACgXqkf_LyIsBQrqwPX3Q_l8Uk1KyWIJ-')
;
xlHttpHeaders.Add('x-amz-Date', '2021052105T1805Z');
xlHttpHeaders.Add('user-agent', Business Cental');
xlHttpHeaders.Add('Authorization', 'AWS4-HMAC-SHA256 Credential=AKIASYPUJ43AO6HVDRYZ/20210521/eu-west-1/execute-api/aws4_request,SignedHeaders=host;x-amz-date,Signature=aa3f374d37b04c750c95422c4e3da3fa519696717e14c5d327da6f477e8b6ce4'))
;

But this last line gives me an error: the format for value 'AWS4-HMAC-SHA256 Credential=AKIASYPUJ43AO6HVDRYZ/20210521/eu-west-1/execute-api/aws4_request,SignedHeaders=host;x-amz-date,Signature=aa3f374d37b04c750c95422c4e3da3fa519696717e14c5d327da6f477e8b6ce4' is not valid.

I tried with xlHttpHeaders.TryAddWithoutValidation('Authorization', 'AWS4-HMAC-SHA256 Credential=AKIASYPUJ43AO6HVDRYZ/20210521/eu-west-1/execute-api/aws4_request,SignedHeaders=host;x-amz-date,Signature=aa3f374d37b04c750c95422c4e3da3fa519696717e14c5d327da6f477e8b6ce4'); then I do not get the error but do not add the header. I tried aswell with DefaultRequestHeaders().Add and the same error.

Any idea?

Thank you ever so much

Related
Recommended