smithy-rs/examples/pokemon-service-client-usage
John DiSanti e3f0de42db
Move `Metadata` config bag type into a stable crate (#3325)
This issue addresses a semver compatibility problem similar to the one
described in #3318, except for the
`aws_smithy_http::operation::Metadata` type.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2024-01-12 19:11:29 +00:00
..
examples Move `Metadata` config bag type into a stable crate (#3325) 2024-01-12 19:11:29 +00:00
src Client examples that use the generic client have been added (#2799) 2023-10-20 14:50:59 +00:00
Cargo.toml Move `Metadata` config bag type into a stable crate (#3325) 2024-01-12 19:11:29 +00:00
README.md Fix repo org move issues (#3166) 2023-11-10 18:51:04 +00:00

README.md

smithy-rs Client Examples

This package contains some examples on how to use the Smithy Client to communicate with a Smithy-based service.

Pre-requisites

  1. Build the pokemon-service-client and pokemon-service by invoking make in the examples folder.
make
  1. Run the Pokemon service locally by issuing the following command from the examples folder. This will launch the Smithy-Rs based service on TCP port 13734.
cargo run --bin pokemon-service

Running the examples

You can view a list of examples by running cargo run --example from the pokemon-service-client-usage folder. To run an example, pass its name to the cargo run --example command, e.g.:

cargo run --example simple-client

List of examples

Rust Example Description
simple-client Creates a Smithy Client and calls an operation on it.
endpoint-resolver How to set a custom endpoint resolver.
handling-errors How to send an input parameter to an operation, and to handle errors.
custom-header How to add headers to a request.
custom-header-using-interceptor How to access operation name being called in an interceptor.
response-header-interceptor How to get operation name and access response before it is deserialized.
use-config-bag How to use the property bag to pass data across interceptors.
retries-customize Customize retry settings.
retries-disable How to disable retries.
timeout-config How to configure timeouts.
mock-request Use a custom HttpConnector / Client to generate mock responses.
trace-serialize Trace request and response as they are serialized / deserialized.
client-connector Shows how to change TLS related configuration.