Skip to content

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

367 B
Raw Blame
export default {
  props: {
    response: {},
  },
  computed: {
    responseBodyText() {
      if (typeof this.response.body === "string") return this.response.body

      const res = new TextDecoder("utf-8").decode(this.response.body)

      // HACK: Temporary trailing null character issue from the extension fix
      return res.replace(/\0+$/, "")
    },
  },
}