Skip to content

Commit f5f90ab

Browse files
author
Yang Zhen
committed
Add post JSON
1 parent 167c390 commit f5f90ab

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

app/styles/dark/styles/java.styl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
.project-config-container .form-line .fa-folder-o {
1+
.modals-container .project-config-container .form-line .fa-folder-o {
22
border-color: $tab-bar-border-color;
33
}

app/utils/request.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,21 @@ request.raw = function (options) {
133133
return axios(options)
134134
}
135135

136+
request.postJSON = function (url, data, options = {}) {
137+
return request({
138+
method: 'post',
139+
url,
140+
data,
141+
headers: {
142+
'Content-Type': 'application/json',
143+
...(config.isPlatform && {
144+
Accept: 'application/vnd.coding.v2+json'
145+
})
146+
},
147+
...options,
148+
})
149+
}
150+
136151
request.axios = axios
137152

138153
export default request

0 commit comments

Comments
 (0)