mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-01-30 14:39:56 +08:00
fix: remove useless Content-Type header in GET request. Closes #984.
This commit is contained in:
parent
f869ddbbd2
commit
96e6554b37
@ -239,7 +239,7 @@ public class MicrosoftService {
|
||||
+ "PublicGamerpic,ShowUserAsAvatar,Gamerscore,Gamertag,ModernGamertag,ModernGamertagSuffix,"
|
||||
+ "UniqueModernGamertag,AccountTier,TenureLevel,XboxOneRep,"
|
||||
+ "PreferredColor,Location,Bio,Watermarks," + "RealName,RealNameOverride,IsQuarantined"))
|
||||
.contentType("application/json").accept("application/json")
|
||||
.accept("application/json")
|
||||
.authorization(String.format("XBL3.0 x=%s;%s", uhs, xstsToken)).header("x-xbl-contract-version", "3")
|
||||
.getString();
|
||||
}
|
||||
@ -247,7 +247,7 @@ public class MicrosoftService {
|
||||
private static MinecraftProfileResponse getMinecraftProfile(String tokenType, String accessToken)
|
||||
throws IOException, AuthenticationException {
|
||||
HttpURLConnection conn = HttpRequest.GET("https://api.minecraftservices.com/minecraft/profile")
|
||||
.contentType("application/json").authorization(String.format("%s %s", tokenType, accessToken))
|
||||
.authorization(String.format("%s %s", tokenType, accessToken))
|
||||
.createConnection();
|
||||
int responseCode = conn.getResponseCode();
|
||||
if (responseCode == HTTP_NOT_FOUND) {
|
||||
|
Loading…
Reference in New Issue
Block a user