rework: added cross-domain requests support, integration tests