Fundamental to Internet programming is the Uniform Resource Identifier (URI). A URI describes the location of some resource on the network. A URI is also commonly called a URL, which is short for Uniform Resource Locator. Because Microsoft uses the term URI when describing the members of System.Net, this book will do so, too. You are no doubt familiar with URIs because you use one every time you enter an address into your Internet browser.
A URI has the following general form:
Protocol://ServerID/FilePath?Query
Protocol specifies the protocol being used, such as HTTP. ServerID identifies the specific server, such as Osborne.com or Weather.com. FilePath specifies the path to a specific file. If FilePath is not specified, the default page at the specified ServerID is obtained. Finally, Query specifies information that will be sent to the server. Query is optional. In C#, URIs are encapsulated by the Uri class, which is examined later in this chapter.