Added `events(Vec<Event>)` to `RequestBuilderExt` to provide a batched
set of Events to send to an HTTP endpoint, and
`into_events() -> Result<Vec<Event>>` to ResponseExt to parse a batched
Event response.
I deliberately kept things simple, as I thought this would be a good
place to start with Batch support throughout the SDK, and the
implementation was simple enough, that there didn't seem to be much
opportunity for reusable libraries across the SDK.
That could be changed as more Batch support is provided across the SDK,
and opportunities for code reuse present themselves.
Signed-off-by: Mark Mandel <markmandel@google.com>
* show feature gated bindings in docsrs
* moved crate root docsrs feature
* fixed cargo fmt check
* removed files that should go with another PR
Signed-off-by: minghuaw <michael.wu1107@gmail.com>
This proved very difficult due to the different ownership behavior
between each builder, i.e. warp is a consuming builder, actix isn't.
With the use of the Rc/Cell/RefCell, I worry that this is now more
complex than it was, and for all I know, I've introduced a memory leak
somewhere. :)
Since the reqwest builder is also consuming, it should be able to
follow the same "adapter" pattern as warp. Unfortunately, the reqwest
builder doesn't implement the Default trait, so I can't use take() and
I've yet to come up with another solution.
Since 2/3 of the builders are consumers, it's possible we might
simplify the code by having the new Builder trait reflect that,
i.e. using self instead of &self in the fn params. We'll investigate
that next.
For now, I'm just happy to have 2 builders sharing some formerly
redundant behavior.
Signed-off-by: Jim Crossley <jim@crossleys.org>
* Refactor redundant header logic to a shared lib
* Remove some unused code
* Share macro between actix and warp, eliminating actix header mod
Fixes#145
Signed-off-by: Jim Crossley <jim@crossleys.org>
* Renamed features
Moved all bindings under a binding crate
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Cargo fmt
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Now this should build
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Use the new cache plugin
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Fix
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Fix the build
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Fixed doc links
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Change link
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>