view http/test/urlTest.k @ 13:0335cdd081d0 draft

modify HttpRequest.k
author Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
date Mon, 28 May 2012 23:56:15 +0900
parents da5149cbb9f4
children 44e3247ed7c1
line wrap: on
line source

include "../URL.k";


void main(String[] args)
{
	String url = "http://ie.u-ryukyu.ac.jp/~kono/lecture/index.html";
	print url;
	URL u;
	try {
		u = new URL(url);
	} catch(Script!! e) {
		OUT << "catch Script!!" <<< EOL;
		OUT << e << EOL;
		System.exit(0);
	}
	print u.getURL();
	print u.getHost();
	print u.getUri();

	


}