![micheal john](https://www.crazyengineers.com/img/avatar.jpg)
Member • Feb 10, 2014
Need help on REST client communicating with remote server
Projects initial requirements is to create a client to communicate with a REST web service server(remote server) using jersey,
i want to create a CLIENT REQUEST HEADER which contains following parameters in same order.
Request PATTERN:
1)GET(method)
2)URL domain(remote)
3)URL path
4)date field(date and time)
5)access key(public key)
6)accept field(application/xml or application/json)
amateur code:
Client client = Client.create();
WebResource webResource =client.resource(url);
ClientResponse response = webResource.queryParam("Date", timeStamp+" GMT")
.header("Authorization", requestAuthKey)
.accept(MediaType.APPLICATION_XML_TYPE)
.get(ClientResponse.class);
😀