An issue came up when discussing the use of curl in HttpGet (#57).
HttpGet Command should
Have connection timeout when doing curl
Throw an exception on timeout
Throw an exception on error
Parts of the code that rely on HttpGet should
Handle exceptions
Fail gracefully on error
"Fail gracefully" is a bit vague. Maybe it would be sufficient to return an error to the user. What we'd like to avoid is a case where the whole application crashes when attempting to fetch a resource at $SOME_URL.
@ESmith92 in #57
also should we add a timeout for the curl (var seconds = 120; curl_setopt($ch, CURLOPT_TIMEOUT, seconds );)
...
one more thing: we should add a get function for curl info (return curl_getinfo( $curl );) so we can throw exceptions
An issue came up when discussing the use of curl in
HttpGet
(#57).HttpGet Command should
Parts of the code that rely on HttpGet should
Fail gracefully on error
"Fail gracefully" is a bit vague. Maybe it would be sufficient to return an error to the user. What we'd like to avoid is a case where the whole application crashes when attempting to fetch a resource at $SOME_URL.
@ESmith92 in #57