Skip to content

Commit

Permalink
fix(ui): set content-type for certain UI requests (#16923) (#16930) (#…
Browse files Browse the repository at this point in the history
…16932)

Signed-off-by: Michael Crenshaw <[email protected]>
Co-authored-by: Michael Crenshaw <[email protected]>
  • Loading branch information
gcp-cherry-pick-bot[bot] and crenshaw-dev authored Jan 19, 2024
1 parent 4d0f940 commit da10276
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ui/src/app/shared/services/requests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,19 @@ export default {
},

post(url: string) {
return initHandlers(agent.post(`${apiRoot()}${url}`));
return initHandlers(agent.post(`${apiRoot()}${url}`)).set('Content-Type', 'application/json');
},

put(url: string) {
return initHandlers(agent.put(`${apiRoot()}${url}`));
return initHandlers(agent.put(`${apiRoot()}${url}`)).set('Content-Type', 'application/json');
},

patch(url: string) {
return initHandlers(agent.patch(`${apiRoot()}${url}`));
return initHandlers(agent.patch(`${apiRoot()}${url}`)).set('Content-Type', 'application/json');
},

delete(url: string) {
return initHandlers(agent.del(`${apiRoot()}${url}`));
return initHandlers(agent.del(`${apiRoot()}${url}`)).set('Content-Type', 'application/json');
},

loadEventSource(url: string): Observable<string> {
Expand Down

0 comments on commit da10276

Please sign in to comment.