Browse Source

Merge pull request #75 in DEC/decision-webui-dcm from ~ALAN/decision-webui-dcm:feature/10.0 to feature/10.0

* commit '556f4f6a93501ec46307df22a6610c2218ba7042':
  fix: 无jira任务,全部使用application/json
qufenxi
alan 5 years ago
parent
commit
1b8adc014f
  1. 13
      src/modules/crud/crud.service.ts

13
src/modules/crud/crud.service.ts

@ -51,6 +51,7 @@ export async function request(reqOptions: CrudReqOpts = {}): Promise<ResultType>
...defaultHeaders, ...defaultHeaders,
...headers, ...headers,
Authorization: `Bearer ${getCookieByName('fine_auth_token')}`, Authorization: `Bearer ${getCookieByName('fine_auth_token')}`,
'Content-Type': 'application/json;charset=UTF-8',
}, },
params, params,
paramsSerializer, paramsSerializer,
@ -76,9 +77,6 @@ export function requestGet(url: string, data?: any, params: CrudParams = {}) {
type: 'GET', type: 'GET',
data, data,
params, params,
headers: {
'Content-Type': 'application/json;charset=UTF-8',
},
}); });
} }
@ -88,9 +86,6 @@ export function requestPost(url: string, data = {}, params: CrudParams = {}) {
type: 'POST', type: 'POST',
data, data,
params, params,
headers: {
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
},
}); });
} }
@ -99,9 +94,6 @@ export function requestDelete(url: string, data = {}) {
url, url,
type: 'DELETE', type: 'DELETE',
data, data,
headers: {
'Content-Type': 'application/json;charset=UTF-8',
},
}); });
} }
@ -111,8 +103,5 @@ export function requestPut(url: string, data = {}, params: CrudParams = {}) {
type: 'PUT', type: 'PUT',
data, data,
params, params,
headers: {
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
},
}); });
} }

Loading…
Cancel
Save