summaryrefslogtreecommitdiff
path: root/docs/gl_objects/projects.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/gl_objects/projects.rst')
-rw-r--r--docs/gl_objects/projects.rst5
1 files changed, 4 insertions, 1 deletions
diff --git a/docs/gl_objects/projects.rst b/docs/gl_objects/projects.rst
index 7fc0ab9..5285c40 100644
--- a/docs/gl_objects/projects.rst
+++ b/docs/gl_objects/projects.rst
@@ -434,9 +434,12 @@ Get a file::
# get the base64 encoded content
print(f.content)
- # get the decoded content
+ # get the decoded content as bytes
print(f.decode())
+ # get the decoded content as a string
+ print(f.decode("utf-8"))
+
Get file details from headers, without fetching its entire content::
headers = project.files.head('README.rst', ref='main')