46 releases

new 0.16.3 May 22, 2024
0.16.0 Mar 11, 2024
0.15.1 Oct 20, 2023
0.15.1-rc.0 Dec 18, 2023
0.1.4 Jul 28, 2020

#409 in Rust patterns

Download history 669/week @ 2024-02-02 476/week @ 2024-02-09 575/week @ 2024-02-16 599/week @ 2024-02-23 776/week @ 2024-03-01 1046/week @ 2024-03-08 886/week @ 2024-03-15 552/week @ 2024-03-22 691/week @ 2024-03-29 686/week @ 2024-04-05 460/week @ 2024-04-12 629/week @ 2024-04-19 539/week @ 2024-04-26 745/week @ 2024-05-03 920/week @ 2024-05-10 537/week @ 2024-05-17

2,840 downloads per month
Used in prima-tracing

MIT license


Build Status


Prima bridge pattern implementation for rust

Api documentation


You can find all the examples in examples directory.


This crate gives an high level API to execute external HTTP requests.

It is supposed to give the basics building blocks for building bridges to other services while abstracting the low level stuff like adding custom headers and request tracing.

It supports both REST and GraphQL requests.

You should start by creating a [Bridge] instance. This instance should live for all the application lifetime.

Do not create a new bridge on every request!

You should use something like once_cell or lazy_static, or some sort of inversion of control container to pass around.

The bridge implement a type state pattern to build the external request.


  • auth0 - enable auth0 integration, allowing bridge.rs to retrieve tokens from auth0 for authentication

  • gzip - provides response body gzip decompression.

  • redis-tls - add support for connecting to redis with tls

  • tracing-opentelemetry adds support for integration with opentelemetry. This feature is an alias for the tracing_opentelemetry_0_21 feature. tracing_opentelemetry_0_20 is also available as to support the 0.20 opentelemetry libraries.

    We are going to support at least the last 3 versions of opentelemetry. After that we mightremove support for older otel version without it being a breaking change.


~384K SLoC