Trim $api_url in Observer.php