A URI (Uniform Resource Identifier) is a string of characters that identifies a name or a resource on the internet. It is used to identify a resource, such as a file, web page, or a document, and to provide a means for locating and accessing that resource.
A URI consists of two main parts: a scheme and a path. The scheme indicates the protocol used to access the resource, such as HTTP, FTP, or mailto. The path provides the location of the resource within the specified scheme.
For example, in the URI “https://www.example.com/index.html“, the scheme is “https” and the path is “/index.html”. The URI specifies a web page, located on the www.example.com server, that can be accessed using the HTTPS protocol.
URIs can also include additional components, such as query parameters and fragments. Query parameters provide additional information about the resource being requested and are typically separated from the path by a question mark (?). Fragments are used to specify a specific section or location within a resource and are typically separated from the path by a hash symbol (#).
URIs are a fundamental building block of the web and are used extensively in web development, including the development of RESTful APIs.