implemented basic async write function with cpp_rest