github授权登录,报错connection reset

看官方api,https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param/

修改代码

Request request = new Request.Builder()
 .url("https://api.github.com/user?access_token=" + accessToken)
 .build();

Request request = new Request.Builder()
                .url("https://api.github.com/user")
                .header("Authorization","token "+accessToken)
                .build();

github授权登录,报错connection reset_第1张图片

你可能感兴趣的:(java)