-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
always use ISO-8859-1 encoding #1
Comments
Thank you for bringing it up. Changed the encoding, ran tests on other repository, which uses Royal Mail test server and it still worked. |
System.ServiceModel.FaultException: Authorisation Failure getting error when i am implementing royailmail api for print label plz help me thank you |
Hi, @Manishpce , did you test it both with commit b498851 changes and without it? I've done it on 23 of May, just a little bit before you posted the message. |
yes sir i've already changes ur correction and then implement but getting the error authorisation failure |
In that case, are you sure your credentials are correct? Have you tried to test it manually trough Royal Mail website? |
yes sir i've tried it on royail mail website getting internal server error |
after struggling for two days, I finally find it out why this code doesn't work on side.
According to royal mail API documentation, they are using the ISO-8859-1 encoding in their system.
Which means, any hashing function on the client should use exactly the same encoding as well.
Hence, in the RoyalMailApiClient.cs file, could you kindly replace all
Encoding.Default
toEncoding.GetEncoding("iso-8859-1")
?Encoding.Default is OS environment related, and equals to iso-8859-1 when the OS system locale is set to English(United Kingdom). And this is why using
Encoding.Default
is discouraged...The text was updated successfully, but these errors were encountered: