Options
string
required
Path to the file within the repository.
string
Branch name, tag, or commit SHA. Defaults to the default branch.
boolean
When
true, resolves the ref under the ephemeral namespace.boolean
When
true, resolves the base branch under the ephemeral namespace. TypeScript: ephemeralBase;
Python: ephemeral_base; Go: EphemeralBase.string
HTTP
Range header, such as bytes=0-1023. TypeScript/Python: range; Go: Range.string
HTTP
If-Match header. TypeScript: ifMatch; Python: if_match; Go: IfMatch.string
HTTP
If-None-Match header. TypeScript: ifNoneMatch; Python: if_none_match; Go:
IfNoneMatch.string
HTTP
If-Modified-Since header. TypeScript: ifModifiedSince; Python: if_modified_since; Go:
IfModifiedSince.string
HTTP
If-Unmodified-Since header. TypeScript: ifUnmodifiedSince; Python: if_unmodified_since;
Go: IfUnmodifiedSince.string
HTTP
If-Range header. TypeScript: ifRange; Python: if_range; Go: IfRange.number
Token TTL in seconds.
Response
headFile() returns parsed metadata from HEAD /repos/file. Range and conditional outcomes with
status 206, 304, 412, and 416 are surfaced as SDK results.
number
HTTP response status. Python:
status_code; Go: StatusCode.string
Blob SHA for the file. Python:
blob_sha; Go: BlobSHA.string
SHA of the most recent commit that modified the file. Python:
last_commit_sha; Go:
LastCommitSHA.number
Content length in bytes when the server provides it.
string
ETag returned by the file endpoint. Go:
ETag.Date | datetime | time.Time
Parsed
Last-Modified timestamp. Python: last_modified; Go: LastModified.string
Raw
Last-Modified header. Python: raw_last_modified; Go: RawLastModified.string
Accept-Ranges header, when present. Python: accept_ranges; Go: AcceptRanges.string
Content-Range header, when present. Python: content_range; Go: ContentRange.string
Content-Type header, when present. Python: content_type; Go: ContentType.