how to send request to rest api in java