Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
佳 邓
Gitlab4j Api
Commits
a00b1f09
Unverified
Commit
a00b1f09
authored
Feb 05, 2023
by
twarner-sofi
Committed by
GitHub
Feb 05, 2023
Browse files
Support X-Gitlab-Content-Sha256 header (#904)
parent
73f200a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/RepositoryFileApi.java
View file @
a00b1f09
...
@@ -71,6 +71,7 @@ public class RepositoryFileApi extends AbstractApi {
...
@@ -71,6 +71,7 @@ public class RepositoryFileApi extends AbstractApi {
RepositoryFile
file
=
new
RepositoryFile
();
RepositoryFile
file
=
new
RepositoryFile
();
file
.
setBlobId
(
response
.
getHeaderString
(
"X-Gitlab-Blob-Id"
));
file
.
setBlobId
(
response
.
getHeaderString
(
"X-Gitlab-Blob-Id"
));
file
.
setCommitId
(
response
.
getHeaderString
(
"X-Gitlab-Commit-Id"
));
file
.
setCommitId
(
response
.
getHeaderString
(
"X-Gitlab-Commit-Id"
));
file
.
setContentSha256
(
response
.
getHeaderString
(
"X-Gitlab-Content-Sha256"
));
String
encoding
=
response
.
getHeaderString
(
"X-Gitlab-Encoding"
);
String
encoding
=
response
.
getHeaderString
(
"X-Gitlab-Encoding"
);
file
.
setEncoding
(
Constants
.
Encoding
.
forValue
(
encoding
));
file
.
setEncoding
(
Constants
.
Encoding
.
forValue
(
encoding
));
...
@@ -515,4 +516,4 @@ public class RepositoryFileApi extends AbstractApi {
...
@@ -515,4 +516,4 @@ public class RepositoryFileApi extends AbstractApi {
public
Stream
<
Blame
>
getBlameStream
(
Object
projectIdOrPath
,
String
filePath
,
String
ref
)
throws
GitLabApiException
{
public
Stream
<
Blame
>
getBlameStream
(
Object
projectIdOrPath
,
String
filePath
,
String
ref
)
throws
GitLabApiException
{
return
(
getBlame
(
projectIdOrPath
,
filePath
,
ref
,
getDefaultPerPage
()).
stream
());
return
(
getBlame
(
projectIdOrPath
,
filePath
,
ref
,
getDefaultPerPage
()).
stream
());
}
}
}
}
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment