post data to server by api;