-
Notifications
You must be signed in to change notification settings - Fork 256
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 timestamp signature handler #301
Conversation
Codecov Report
@@ Coverage Diff @@
## development #301 +/- ##
===============================================
- Coverage 62.24% 52.30% -9.94%
===============================================
Files 235 236 +1
Lines 45395 45556 +161
===============================================
- Hits 28256 23828 -4428
- Misses 16498 18650 +2152
- Partials 641 3078 +2437
Continue to review full report at Codecov.
|
@a5i Can you add documentation and example/testcase how to combine signing and timestamping also.
Would be good to have a testcase that does this. |
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.
Looks good overall. I added a couple of observations.
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.
I left two minor observations. Other than that, everything looks good to me.
} | ||
|
||
if resp.StatusCode != http.StatusOK { | ||
return fmt.Errorf("http status code wiats 200 got %d", resp.StatusCode) |
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 correct the error message. Also, might be more efficient to do the status code check before ioutil.ReadAll(resp.Body)
as the body is not relevant if the request was not successful. Another option would be to leave the status code check where it is now and also print the response body in order to identify the issue easily (maybe print the response body in a common.Log.Debug
call for status != 200
).
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
This change is