Skip to content

Commit 590859b

Browse files
committed
Merge pull request github#808 from github/update-1435083531
2 parents 02465ee + 6832825 commit 590859b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

content/v3/repos/contents.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ This method returns the contents of a file or directory in a repository.
3636
GET /repos/:owner/:repo/contents/:path
3737

3838
Files and symlinks support [a custom media type](#custom-media-types) for retrieving the raw content or rendered HTML (when supported).
39-
Directories and submodules do _not_ support custom media types.
39+
All content types support [a custom media type](#custom-media-types) to ensure the content is returned in a consistent object format.
4040

4141
{{#tip}}
4242

@@ -284,4 +284,11 @@ Use the `.raw` media type to retrieve the contents of the file.
284284

285285
For markup files such as Markdown or AsciiDoc, you can retrieve the rendered HTML using the `.html` media type. Markup languages are rendered to HTML using our open-source [Markup library](https://github.com/github/markup).
286286

287+
[All objects](#get-contents) support the following custom media type:
288+
289+
application/vnd.github.VERSION.object
290+
291+
Use the `object` media type parameter to retrieve the contents in a consistent object format regardless of the content type. For example, instead of an array of objects
292+
for a directory, the response will be an object with an `entries` attribute containing the array of objects.
293+
287294
You can read more about the use of media types in the API [here](/v3/media/).

0 commit comments

Comments
 (0)