Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
1130 template body content type
Browse files Browse the repository at this point in the history
  • Loading branch information
senia-psm committed Nov 27, 2023
1 parent 90ef01b commit 650223f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/clients/template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ impl TemplateClient for TemplateClientLive {
Ok((&template).into())
} else {
Err(GolemError(format!(
"Templates list request failed with status {status} and content {content}"
"Templates add request failed with status {status} and content {content}"
)))
}
}
Expand Down Expand Up @@ -330,6 +330,8 @@ impl TemplateClient for TemplateClientLive {
}
};

request = request.header(reqwest::header::CONTENT_TYPE, "application/octet-stream");

let resp = self.configuration.client.execute(request.build()?).await?;

let status = resp.status();
Expand All @@ -341,7 +343,7 @@ impl TemplateClient for TemplateClientLive {
Ok((&template).into())
} else {
Err(GolemError(format!(
"Templates list request failed with status {status} and content {content}"
"Templates update request failed with status {status} and content {content}"
)))
}
}
Expand Down Expand Up @@ -373,6 +375,7 @@ struct TemplateMetadata {
}

#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
#[serde(tag = "type")]
enum Export {
Instance(ExportInstance),
Function(ExportFunction),
Expand Down Expand Up @@ -404,6 +407,7 @@ struct FunctionResult {
}

#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
#[serde(tag = "type")]
enum Type {
Variant(TypeVariant),
Result(TypeResult),
Expand Down

0 comments on commit 650223f

Please sign in to comment.