sends data through REST API