Content-type

This commit is contained in:
Juan Pablo Vial
2025-05-29 17:43:14 -04:00
parent 4505531c5f
commit 5b499aee75

View File

@ -18,7 +18,7 @@ class Enqueue extends Command
$output->writeln("POST {$uri}");
$body = ['venta_ids' => explode('|', $input->getArgument('venta_ids'))];
$output->writeln(json_encode($body));
$response = $this->client->post($uri, ['json' => $body]);
$response = $this->client->post($uri, ['json' => $body, 'headers' => ['Content-Type' => 'application/json']]);
$output->writeln("Response Code: {$response->getStatusCode()}");
$output->writeln($response->getBody()->getContents());
return Console\Command\Command::SUCCESS;