Skip to content

Commit

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

Signed-off-by: Michael Crenshaw <[email protected]>
Signed-off-by: Kevin Lyda <[email protected]>
  • Loading branch information
crenshaw-dev authored and lyda committed Mar 28, 2024
1 parent d3a0ec3 commit d18704c
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 d18704c

Please sign in to comment.