headers->set('Content-Type', 'application/json'); $data = json_decode($resp, true); if($aqi >= 151) $emailSender->sendEmail($data); return $response; } }