Your question may already have an answer on the community forum. Please search for related topics, and then read through the guidelines before creating a new topic.
My question: How to pass error HTTP Header Content-MD5 invalid with variable raw text body
Details (like screenshots):
Hello Community,
I’m working for a healthtech company, we are using Postman to pass some HL7 messages.
For that we pass every HL7 message through the Body in raw text format.
There is many values to change manually every time so I decided to automatise a little bit this use case of Postman.
In order to do so i added some variables values on my Body, keeping the raw text format.
MSH|^~&|company1||company2||{{DateNow}}||SIU^S12^SIU_S12|{{guid}}|P|2.5.1|||||FRA|UTF-8
SCH||17356735^company||||1^Première consultation d’endocrinologie (thyroïde, etc.)|||||^^15^202305121100|||||121852^WORKERSNAME||||company|||||Booked
NTE|||
PID|||35525933^^^company^PI||{{nom}}^{{prenom}}^^^^^L|||U|||||
RGS|1
AIG|1|||endo^DR Endocrino
I call in my collection pre-script the faker library for 2 variables, and the 2 other one are calculated on the collection pre-script too.
How I found the problem:
When I try to send the HL7 message, the error message is bad request with the following message : “HTTP Header Content-MD5 invalid: expected 2o5aPKvAN1KfSqpI3UcJWQ== but was IgxBKGel5/K5NTzGS9Jkcg==”
IgxBKGel5/K5NTzGS9Jkcg== is : MD5 encrypted body wich is encoded to base 64
2o5aPKvAN1KfSqpI3UcJWQ== is suppose to be the same thing but i can’t manage to find the same thing
I’ve already tried:
The body is calculated before the crypting and encoding part.
I use Property.replaceSubstitutions to force the substitution before.
Best regards,
Jules