I am trying to implement the code in the Asynchronous Exchanges section of this link in the documentation for the pier:
http://wiki.eclipse.org/Jetty/Tutorial/HttpClient#Asynchronous_Exchanges
HttpExchange exchange = new HttpExchange();
exchange.setMethod("POST");
exchange.setAddress(new Address("ping.host.com", 80));
exchange.setURI("/ping");
exchange.setURL("http://ping.host.com/ping");
client.send(exchange);
System.out.println("Exchange sent");
I am trying to figure out which HttpExchange class is used. I loaded the pier from here http://download.eclipse.org/jetty/
but could not find a link to HttpExchange anywhere in the files. Could this be an HttpExchange from com.sun.net.httpserver? When I try to use it in the sun, I get an error message indicating that the class does not have an HttpExchange () constructor (without parameters).
source
share