Skip to content

Commit

Permalink
Merge pull request #2 from willemdj/master
Browse files Browse the repository at this point in the history
add description of timeout option to client integration documentation.
  • Loading branch information
cmullaparthi committed Mar 22, 2016
2 parents f40c0d2 + e702115 commit 4ca54cd
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions doc/integrating_a_http_client.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,20 @@ passed on to the HTTP client.
It is the responsibility of the HTTP client integration to ensure that the
HTTP request is executed and that the response is translated to the
`http_response()` type.

There are three options that are documented explicitly in the [client
tutorial](soap_client_tutorial.md) and that should work for _all_ clients:

1. `{http_client, module()}` - use an HTTP
client that is different from what was specified when generating the
client module.
2. `{url, URL::string()}` - use a URL that is different from the URL
specified in the WSDL.
3. `{timeout, Value}`. This allows to set the timeout for the request, in milliseconds.
It defaults to the default of the used client.

From these 3 options the first two are handled by the framework itself,
but the 3rd one (`{timeout, Value}`) must be handled by the integration
module. If this option is in the list of options that is passed to
`http_request/5`, then the integration module must translate this to the
correct option or parameter that is used by the specific HTTP client.

0 comments on commit 4ca54cd

Please sign in to comment.