File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,16 @@ export function getShellExample(
39
39
contentTypeHeader = '-H "Content-Type: multipart/form-data"'
40
40
}
41
41
42
+ // GHES Manage API requests differ from the dotcom API requests and make use of multipart/form-data and json content types
43
+ if ( operation . subcategory === 'manage-ghes' ) {
44
+ // GET requests don't have a requestBody set, therefore let's default them to application/json
45
+ if ( operation . verb === 'get' ) {
46
+ contentTypeHeader = '-H "Content-Type: application/json"'
47
+ } else {
48
+ contentTypeHeader = `-H "Content-Type: ${ codeSample ?. request ?. contentType } "`
49
+ }
50
+ }
51
+
42
52
let requestPath = codeSample ?. request ?. parameters
43
53
? parseTemplate ( operation . requestPath ) . expand ( codeSample . request . parameters )
44
54
: operation . requestPath
You can’t perform that action at this time.
0 commit comments