-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
It's currently not possible to call any XML endpoints that require a struct for their payload such as S3 CreateBucket.
pub const create_bucket: struct {
// ...
Request: type = struct {
// ...
create_bucket_configuration: ?struct {
location_constraint: ?[]const u8 = null,
location: ?struct {
type: ?[]const u8 = null,
name: ?[]const u8 = null,
pub fn fieldNameFor(_: @This(), comptime field_name: []const u8) []const u8 {
const mappings = .{
.type = "Type",
.name = "Name",
};
return @field(mappings, field_name);
}
} = null,
bucket: ?struct {
// ...
} = null,
// ...
} = null,
// ...
pub const http_payload: []const u8 = "create_bucket_configuration";
// ...
},
// ...
} = .{};Code in question:
Lines 241 to 245 in ebb727c
| // We will assign the body to the value of the field denoted by | |
| // the http_payload declaration on the request type. | |
| // Hopefully these will always be ?[]const u8, otherwise | |
| // we should see a compile error on this line | |
| aws_request.body = @field(request, ActionRequest.http_payload).?; |
It seems like it needs a way to convert the parameters into an XML string. Did you have any plans for that?
Metadata
Metadata
Assignees
Labels
No labels