Created
February 17, 2012 01:29
-
-
Save pedroreys/1849567 to your computer and use it in GitHub Desktop.
Web API handling unknown media-types
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C:\dev> curl -v -H "Accept: application/some_unknown_media_type" localhost:1705/api/values | |
* About to connect() to localhost port 1705 (#0) | |
* Trying 127.0.0.1... connected | |
* Connected to localhost (127.0.0.1) port 1705 (#0) | |
> GET /api/values HTTP/1.1 | |
> User-Agent: curl/7.21.1 (i686-pc-mingw32) libcurl/7.21.1 OpenSSL/0.9.8r zlib/1.2.3 | |
> Host: localhost:1705 | |
> Accept: application/some_unknown_media_type | |
> | |
< HTTP/1.1 200 OK | |
< Server: ASP.NET Development Server/10.0.0.0 | |
< Date: Fri, 17 Feb 2012 01:27:42 GMT | |
< X-AspNet-Version: 4.0.30319 | |
< Transfer-Encoding: chunked | |
< Cache-Control: no-cache | |
< Pragma: no-cache | |
< Expires: -1 | |
< Content-Type: application/json; charset=utf-8 | |
< Connection: Close | |
< | |
["value1","value2"]* Closing connection #0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment