Add reccomendations for client context#2924
Conversation
This adds guidance on implementing context in Smithy clients.
|
This pull request does not contain a staged changelog entry. To create one, use the Make sure that the description is appropriate for a changelog entry and that the proper feature type is used. See |
docs/source-2.0/guides/client-guidance/application-protocols/http.md
Outdated
Show resolved
Hide resolved
| HTTP clients don't have many common [context](#typed-context) parameters, but | ||
| they should check the context for a request timeout setting and use it if that | ||
| setting's value present. |
There was a problem hiding this comment.
Nit: I think we're missing a word here:
use it if that setting's value present
I think "is" belongs before "present".
| Smithy clients should pass this context object to any integration hooks. | ||
| [TODO: link to interceptors documentation.] There should be at least one hook at | ||
| the beginning of the request pipeline to enable client plugins to populate the | ||
| context as soon as possible. |
There was a problem hiding this comment.
Nit: Saying that there "should be at least one hook at the beginning" sounds like a requirement for hooks, not a requirement for context. I think we should drop that sentence from this doc and just let the (to-be-written) interceptors doc do the talking.
This adds guidance on implementing context in Smithy clients.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.