Error asigning value to HttpHeaders
JJMc
Member Posts: 65
Hy all folks.
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
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
0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 328 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions