Refactoring composer and http-foundation request