You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the reqwest integration for sending cloud events, but the content type seems to always be set to application/json instead of application/cloudevents+json.
Here's the request made to my pipedream request bin:
Cargo.toml
[package]
name = "cloudevents-reqwest-demo"version = "0.1.0"edition = "2021"# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
anyhow = "1.0.75"cloudevents-sdk = { version = "0.7.0", features = ["reqwest"] }
reqwest = "0.11.20"serde = { version = "1.0.188", features = ["derive"] }
serde_json = "1.0.107"tokio = { version = "1.32.0", features = ["full"] }
uuid = { version = "1.4.1", features = ["v4"] }
That's not a bug. The sdk is using the Binary content mode to delivery the event using HTTP. In this mode, the HTTP Content-Type header corresponds to the CloudEvents datacontenttype attribute.
I'm using the
reqwest
integration for sending cloud events, but the content type seems to always be set toapplication/json
instead ofapplication/cloudevents+json
.Here's the request made to my pipedream request bin:
Cargo.toml
main.rs
I've tried a few other things that don't seem to work:
.data("application/cloudevents+json")
.header()
for content type on the request builderjson!()
serde macro for.data
I followed this example for getting set up, but I'm not using wasm.
The text was updated successfully, but these errors were encountered: