Skip to content

Overview

A Smithy protocol trait on a service definition controls two things:

  • Wire format — how requests and responses are serialized (JSON, XML, CBOR, Protobuf)
  • HTTP binding — how operations, inputs, and outputs map to HTTP methods, URIs, headers, and bodies

NSmithy reads the protocol trait and generates the matching client and server surfaces. Your handler implementation is protocol-agnostic: the same IMyServiceHandler interface is used regardless of which protocol annotates the service. See Client & Server Usage for the canonical handler and client code — the protocol pages below only cover what is specific to each protocol (its trait, modeling rules, and wire format).

ProtocolTraitGenerated surfacesStatus
alloy#simpleRestJson@simpleRestJson.NET client, ASP.NET Core serverPreview
aws.protocols#restJson1@restJson1.NET client, ASP.NET Core serverPreview
aws.protocols#awsJson1_1@awsJson1_1.NET clientEarly preview
aws.protocols#awsJson1_0@awsJson1_0.NET clientEarly preview
aws.protocols#restXml@restXml.NET clientEarly preview
smithy.protocols#rpcv2Cbor@rpcv2Cbor.NET client, ASP.NET Core serverPreview
alloy.proto#grpc@grpcgRPC client, ASP.NET Core gRPC serverExperimental

See Protocol Status for conformance numbers, maturity details, and guidance on which protocol to choose.