URIs identify and URLs locate; however, locators are also identifiers, so every URL is also a URI, but there are URIs which are not URLs.
This is my name, which is an identifier.
It is like a URI, but cannot be a URL, as it tells you nothing about my location or how to contact me.
In this case it also happens to identify at least 5 other people in the USA alone.
- 4914 West Bay Street, Nassau, Bahamas
This is a locator, which is an identifier for that physical location.
It is like both a URL and URI (since all URLs are URIs), and also identifies me indirectly as "resident of..".
In this case it uniquely identifies me, but that would change if I get a roommate.
I say "like" because these examples do not follow the required syntax.
In computing, a Uniform Resource Locator (URL) is a subset of the Uniform Resource Identifier (URI) that specifies where an identified resource is available and the mechanism for retrieving it. In popular usage and in many technical documents and verbal discussions it is often incorrectly used as a synonym for URI, ... [emphasis mine]
Because of this common confusion, many products and documentation incorrectly use one term instead of the other, assign their own distinction, or use them synonymously.
My name, Roger Pate, could be like a URN (Uniform Resource Name), except those are much more regulated and intended to be unique across both space and time.
Because I currently share this name with other people, it's not globally unique and would not be appropriate as a URN. However, even if no other family used this name, I'm named after my paternal grandfather, so it still wouldn't be unique across time. And even if that wasn't the case, the possibility of naming my descendants after me make this unsuitable as a URN.
URNs are different from URLs in this rigid uniqueness constraint, even though they both share the syntax of URIs.
The standard Media Type (formerly known as MIME types) is
application/pdf. The assignment is defined in RFC 3778, The application/pdf Media Type, referenced from the Media Types registry.
Media Types are controlled by a standards body, The Internet Assigned Numbers Authority (IANA). This is the same organization that manages the root name servers and the IP address space.
The use of
x-pdf predates the standardization of the Media Type for PDF. Media Types in the
x- namespace are considered experimental, just as those in the
vnd. namespace are considered vendor-specific.
x-pdf might be used for compatibility with old software.
What I might do, if this were to work out, is:
Acceptheader (I think that's what you were talking about) and decide which content-type to send back based on the
For this solution, content-types in the URL would always be represented as an associated file extension, neither part of the query-string nor part of the resource name. But aside from browser-generated requests, the content-types should be coming in through the
So the request comes in as:
The middleware transforms that to:
Your view sees
application/xmland returns a response with XML content.