36 releases (13 breaking)

0.14.3 Nov 2, 2022
0.14.1 Sep 28, 2022
0.13.1 Jun 23, 2022
0.11.0 Mar 2, 2022
0.1.4 Jul 28, 2020

#411 in Rust patterns

Download history 241/week @ 2022-12-01 163/week @ 2022-12-08 244/week @ 2022-12-15 146/week @ 2022-12-22 132/week @ 2022-12-29 200/week @ 2023-01-05 285/week @ 2023-01-12 253/week @ 2023-01-19 252/week @ 2023-01-26 371/week @ 2023-02-02 585/week @ 2023-02-09 512/week @ 2023-02-16 355/week @ 2023-02-23 431/week @ 2023-03-02 568/week @ 2023-03-09 727/week @ 2023-03-16

2,128 downloads per month
Used in prima-tracing

MIT license

86KB
2K SLoC

Build Status

bridge.rs

Prima bridge pattern implementation for rust

Api documentation

Examples

You can find all the examples in examples directory.


lib.rs:

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.

Dependencies

~6–18MB
~376K SLoC