Summary


In this chapter, you've seen how a complex library can easily be used to handle something beyond the abilities of the default JDK. Working with cookies and handling both GET and POST requests are fundamental building blocks for the Internet.

In the next chapter, you'll look at components for dealing with other fundamental building blocks, such as FTP and NNTP.

Project Ideas

Write a proxy server , recording the data sent between the browser and a web server. Save this data and then see if you can repeat the interactions with HttpClient. Would this be useful for testing web applications?

Most application developers work with GET and POST requests. Find a web server that supports the full range of HTTP requests and write an interactive application that supports the full range of HTTP request types.

Add some logic to parse the returned HTTP. Can you find URLs in the HTTP? If you can find the URLs, is it worth trying to preload the underlying data, perhaps by running HttpClient in the background as a proxy server? Alternatively, is this a reasonable approach to building a spider application to crawl through a website?




    Apache Jakarta Commons(c) Reusable Java Components
    Real World Web Services
    ISBN: N/A
    EAN: 2147483647
    Year: 2006
    Pages: 137
    Authors: Will Iverson

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net