0

When hitting the API to get the readme for react here: https://api.github.com/repos/facebook/react/readme

I don't know what to do with the base64 encoded text in the "content" string.

Does anyone know how to?

WillKre
  • 6,280
  • 6
  • 32
  • 62

1 Answers1

0

You have to decode the base64 to a human readable format, I guess. Depending on the language you are using but in javacript: atob(content)

Got it from here : https://scotch.io/tutorials/how-to-encode-and-decode-strings-with-base64-in-javascript

As to why they send base64 encoded string, you might find a reason here : What is the advantage of using Base64 encoding?

Community
  • 1
  • 1
Kevin Amiranoff
  • 13,440
  • 11
  • 59
  • 90