-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Issue channel access token
API
#63
Conversation
Sorry for the late response. |
linebot/oauth.go
Outdated
|
||
res, err := call.c.postform(call.ctx, APIEndpointIssueAccessToken, body) | ||
if res != nil && res.Body != nil { | ||
defer res.Body.Close() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please follow practice:
if err != nil {
return nil, err
}
defer closeResponse(res)
This practice prevent malform payload response from server. And make client connection reusable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your review. I fixed it!
d0acad4
to
36f9842
Compare
@sugyan |
Codecov Report
@@ Coverage Diff @@
## master #63 +/- ##
=========================================
+ Coverage 72.11% 72.31% +0.2%
=========================================
Files 23 24 +1
Lines 1757 1806 +49
=========================================
+ Hits 1267 1306 +39
- Misses 413 418 +5
- Partials 77 82 +5
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🙆♂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
https://developers.line.me/en/docs/messaging-api/reference/#issue-channel-access-token