Skip to content

Commit

Permalink
new github api requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
medvednikov committed Apr 6, 2022
1 parent e4eb67d commit 36fc773
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion oauth.v
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ fn (mut app App) oauth_cb() vweb.Result {
token := resp.text.find_between('access_token=', '&')
println('token =$token')
user_js := http.fetch(
url: 'https://api.github.com/user?access_token=$token'
// url: 'https://api.github.com/user?access_token=$token'
url: 'https://api.github.com/user'
method: .get
header: http.new_header(key: .authorization, value: token)
// header: {
//'User-Agent': 'V http client'
//}
Expand Down

0 comments on commit 36fc773

Please sign in to comment.