27
Teosz
6y

Working with a delivery ordering API. Response:
Shipping label type: PDF
Label: base64encoded string

I was like, that's easy, literally two lines of code. Proceeds to convert and save the file. Then on open, bam! Format ubreadable. What the actual fuck?! Found an online converter, and tried to convert it to pdf, to see if I was missing something, but the results was the same.

Then checked the decoded string. First 3 characters: GIF

Well fuck you too! This carrier uses GIF's for it's shipping labels for 2years at least, how hard is it to change that in your fucking api response, you pice of shitbag.

Comments
  • 5
    Yes, they fucked up. All the more reason to not trust their answers, and have your code do its own checks.
  • 2
    Changing the response? No. That would break 2 years old clients which check for “PDF“ to show the gif! 😑
Add Comment