Package one.nio.http

Source Code of one.nio.http.HttpClientTest

package one.nio.http;

import one.nio.net.ConnectionString;

public class HttpClientTest {

    public static void main(String[] args) throws Exception {
        HttpClient client = new HttpClient(new ConnectionString(args[0]));
        String path = args[1];

        Response response = client.get(path);
        System.out.println("Status code: " + response.getStatus());
        System.out.println(response.toString());
        client.close();
    }
}
TOP

Related Classes of one.nio.http.HttpClientTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.