7-api-sequencing #8

Merged
foo merged 5 commits from 7-api-sequencing into main 2023-09-02 14:07:02 +00:00
Showing only changes of commit d43ef34abc - Show all commits

View File

@ -297,10 +297,10 @@ unless($DRY_RUN) {
# Create
foreach my $record (@to_create) {
my $res = $ua->post(
$record[0],
$record->[0],
"Content-Type" => "application/json",
Content => to_json({
records => [ $record[1] ]
records => [ $record->[1] ]
})
);
warn "Failed to create $url: " . $res->status_line . "\n" . $res->content unless $res->is_success;
@ -309,9 +309,9 @@ unless($DRY_RUN) {
# Update
foreach my $record (@to_update) {
my $res = $ua->put(
$record[0],
$record->[0],
"Content-Type" => "application/json",
"Content" => to_json({ records => [ $record[1] ] }),
"Content" => to_json({ records => [ $record->[1] ] }),
);
warn "Failed to update $url: " . $res->status_line unless $res->is_success;
}