Closed bianjp closed 1 year ago
Same here. The files are all ascii text apparently.
Looks like the error is originating from this lines:
When passing the data to client.build_request
, octocrab seems to be encoding the POST data as JSON always irrespective of what is set.
pub fn build_request<B: Serialize + ?Sized>(
&self,
mut builder: Builder,
body: Option<&B>,
) -> Result<http::Request<String>> {
// Since Octocrab doesn't require streamable bodies(aka, file upload) because it is serde::Serialize),
// we can just use String body, since it is both http_body::Body(required by Hyper::Client), and Clone(required by BoxService).
// In case octocrab needs to support cases where body is strictly streamable, it should use something like reqwest::Body,
// since it differentiates between retryable bodies, and streams(aka, it implements try_clone(), which is needed for middlewares like retry).
if let Some(body) = body {
builder = builder.header(http::header::CONTENT_TYPE, "application/json");
let request = builder
.body(serde_json::to_string(body).context(SerdeSnafu)?)
.context(HttpSnafu)?;
Ok(request)
} else {
Ok(builder.body(String::new()).context(HttpSnafu)?)
}
}
Ugh. Octocrab's new API doesn't even allow sending non-string HTTP requests as it requires a request: http::Request<String>
.
Lessen learned from trusting the release process to just work. I'll try to get a new release shipped today.
I deleted and re-uploaded the assets to the 20230507. Sorry about the mix-up, everyone.
All zst files in 20230507 release are actually ascii files.