I have a RestFul service which should receive a% custom header
, the service works correctly, the service client believes it with the Netbeans assistant but I do not know how to fill the% custom% co, this is the client RestFul
public class AlbumServiceClient {
private WebTarget webTarget;
private Client client;
private static final String BASE_URI = "http://localhost:38383/MusicRest/musicApi";
public AlbumServiceClient() {
client = javax.ws.rs.client.ClientBuilder.newClient();
webTarget = client.target(BASE_URI).path("album");
}
public <T> T getAlbumes(Class<T> responseType) throws ClientErrorException {
WebTarget resource = webTarget;
resource = resource.path("getList");
return resource.request(javax.ws.rs.core.MediaType.APPLICATION_XML).get(responseType);
}
public void close() {
client.close();
}
}