diff --git a/src/Service/Image.php b/src/Service/Image.php index 1290d68..c7a26c1 100644 --- a/src/Service/Image.php +++ b/src/Service/Image.php @@ -40,7 +40,8 @@ protected static function payloadJson(Task $task, Discord $discord, array $param return [ 'method' => 'POST', 'headers' => [ - 'Authorization' => $discord->token() + 'Authorization' => $discord->token(), + 'User-Agent' => $discord->useragent(), ], 'data' => [ 'payload_json' => json_encode($params) @@ -60,7 +61,8 @@ protected static function json(Task $task, Discord $discord, array $params) 'method' => 'POST', 'headers' => [ 'Authorization' => $discord->token(), - 'Content-Type' => 'application/json' + 'Content-Type' => 'application/json', + 'User-Agent' => $discord->useragent(), ], 'data' => json_encode($params), 'success' => function ($response) use ($task, $discord) { @@ -131,7 +133,8 @@ public static function varyRegion(Task $task, Discord $discord) 'method' => 'POST', 'headers' => [ 'Authorization' => $discord->token(), - 'Content-Type' => 'application/json' + 'Content-Type' => 'application/json', + 'User-Agent' => $discord->useragent(), ], 'data' => json_encode($params), 'success' => function ($response) use ($task, $discord) { @@ -154,7 +157,8 @@ public static function cancelJob(Task $task, Discord $discord) 'method' => 'POST', 'headers' => [ 'Authorization' => $discord->token(), - 'Content-Type' => 'application/json' + 'Content-Type' => 'application/json', + 'User-Agent' => $discord->useragent(), ], 'data' => json_encode($params), 'success' => function ($response) use ($task, $discord) {