Skip to content

Commit

Permalink
Update console to output utf8 properly
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniomika authored Feb 16, 2021
1 parent 19dee65 commit 75709d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/console.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@
requests.response.removeAll();

if ("Content-Type" in requestData.requestHeaders && requestData.requestHeaders["Content-Type"][0] == "application/json") {
requestData.requestBody = btoa(JSON.stringify(JSON.parse(atob(requestData.requestBody)), null, 4));
requestData.requestBody = btoa(JSON.stringify(JSON.parse(atob(requestData.requestBody)), null, 4).toString('utf-8'));
}

if ("Content-Type" in requestData.responseHeaders && requestData.responseHeaders["Content-Type"][0] == "application/json") {
requestData.responseBody = btoa(JSON.stringify(JSON.parse(atob(requestData.responseBody)), null, 4));
requestData.responseBody = btoa(JSON.stringify(JSON.parse(atob(requestData.responseBody)), null, 4).toString('utf-8'));
}

requests.request.push({
Expand Down

0 comments on commit 75709d2

Please sign in to comment.