File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change 54
54
}
55
55
}
56
56
} ;
57
- xhr . setRequestHeader ( 'Accept' , 'application/vnd.github.raw' ) ;
58
- xhr . setRequestHeader ( 'Content-Type' , 'application/json' ) ;
57
+ xhr . setRequestHeader ( 'Accept' , 'application/vnd.github.raw+json ' ) ;
58
+ xhr . setRequestHeader ( 'Content-Type' , 'application/json;charset=UTF-8 ' ) ;
59
59
if ( ( options . token ) || ( options . username && options . password ) ) {
60
60
xhr . setRequestHeader ( 'Authorization' , options . token
61
61
? 'token ' + options . token
222
222
_request ( "DELETE" , repoPath + "/git/refs/" + ref , options , cb ) ;
223
223
} ;
224
224
225
+ // Create a repo
226
+ // -------
227
+
228
+ this . createRepo = function ( options , cb ) {
229
+ _request ( "POST" , "/user/repos" , options , cb ) ;
230
+ } ;
231
+
232
+ // Delete a repo
233
+ // --------
234
+
235
+ this . deleteRepo = function ( cb ) {
236
+ _request ( "DELETE" , repoPath , options , cb ) ;
237
+ } ;
238
+
225
239
// List all branches of a repository
226
240
// -------
227
241
You can’t perform that action at this time.
0 commit comments