Adding optional parameter "sleep" with min and max limits#31
Merged
aaronpowell merged 5 commits intoaaronpowell:masterfrom Jun 12, 2017
Merged
Adding optional parameter "sleep" with min and max limits#31aaronpowell merged 5 commits intoaaronpowell:masterfrom
aaronpowell merged 5 commits intoaaronpowell:masterfrom
Conversation
Adding an optional parameter "sleep" to delay response
Adding optional parameter "sleep" with min and max limits of 0 and 300000 (5 mins). E.g. usage: http://server-name/400?sleep=5000 This will return HTTP 400 after 5 seconds http://server-name/400 This will return HTTP 400 immediatly
Adding optional parameter "sleep" with min and max limits of 0 and 300000 (5 mins). E.g. usage: http://server-name/400?sleep=5000 This will return HTTP 400 after 5 seconds http://server-name/400 This will return HTTP 400 immediatly
Adding helper method DoSleep to avoid some code repetition.
aaronpowell
reviewed
Jun 12, 2017
| } | ||
|
|
||
| public ActionResult StatusCode(int statusCode) | ||
| public ActionResult StatusCode(int statusCode, int? sleep = 0) |
Owner
There was a problem hiding this comment.
Should this be int? sleep = SLEEP_MIN?
| } | ||
|
|
||
| public ActionResult Cors(int statusCode) | ||
| public ActionResult Cors(int statusCode, int? sleep=0) |
Owner
There was a problem hiding this comment.
Could we keep consistent spacing here, so have a space before and after the =
| /// Limits the sleep parameter | ||
| /// </summary> | ||
| /// <param name="sleep"></param> | ||
| /// <returns></returns> |
Owner
There was a problem hiding this comment.
Don't need to bother with the XML doc comments
Using const for constants instead of static readonly so they can be used to assign optional sleep paramater
balarajagopal
commented
Jun 12, 2017
Contributor
Author
balarajagopal
left a comment
There was a problem hiding this comment.
I have made the suggested changes :)
Owner
|
Merged and should be live now 😃 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adding optional parameter "sleep" with min and max limits of 0 and 300000 (5 mins).
E.g. usage:
http://server-name/400?sleep=5000
This will return HTTP 400 after 5 seconds
http://server-name/400
This will return HTTP 400 immediatly