Ok, I have found that it does not process after

$request = new HttpRequest();

So maybe there is a library I need to add?...