Skip to content

Commit

Permalink
Assume requests are json if the content-type header includes
Browse files Browse the repository at this point in the history
public/video-ui/src/services/pandaReqwest.js - doesn't need to be an exact match
  • Loading branch information
rhystmills committed Nov 28, 2024
1 parent 925d261 commit 477b2c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion public/video-ui/src/services/pandaReqwest.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const poll = (url, body, timeout) => {
fetch(url, body)
.then(checkStatus)
.then(response => {
if (response.headers.get("content-type") === "application/json"){
if (response.headers.get("content-type").includes("application/json")){
return response.json();
}
return response.text();
Expand Down

0 comments on commit 477b2c7

Please sign in to comment.