Skip to content

Commit c2f560a

Browse files
committed
Set Accept header if it is missing
1 parent 066af55 commit c2f560a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/org/kohsuke/github/GitHubClient.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,9 @@ private GitHubRequest prepareRequest(GitHubRequest request) throws IOException {
410410
builder.setHeader("Authorization", authorization);
411411
}
412412
}
413+
if (request.header("Accept") == null) {
414+
builder.setHeader("Accept", "application/vnd.github.v3+json");
415+
}
413416
builder.setHeader("Accept-Encoding", "gzip");
414417

415418
if (request.inBody()) {

0 commit comments

Comments
 (0)