0

What one gets back when resolving a DOI depends on content negotiation. I was looking at https://citation.crosscite.org/docs.html#sec-3 and I see different services offer different Content Types.

For a particular URL I want to know all the content types it can give me. Some of them might be more useful than any that I am aware of (i.e. i don't want to write a list of preferences in advance).

For example:

https://doi.org/10.5061/dryad.1r170

I thought maybe OPTIONS was the way to do it

but that gave back nothing interesting, only about allowed request methods.

shell> curl  -v -X OPTIONS   http://doi.org/10.5061/dryad.1r170
* Hostname was NOT found in DNS cache
*   Trying 2600:1f14:6cf:c01::d...
*   Trying 54.191.229.235...
* Connected to doi.org (2600:1f14:6cf:c01::d) port 80 (#0)
> OPTIONS /10.5061/dryad.1r170 HTTP/1.1
> User-Agent: curl/7.38.0
> Host: doi.org
> Accept: */*
>
< HTTP/1.1 200 OK
* Server Apache-Coyote/1.1 is not blacklisted
< Server: Apache-Coyote/1.1
< Allow: GET, HEAD, POST, TRACE, OPTIONS
< Content-Length: 0
< Date: Mon, 29 Jan 2018 07:01:14 GMT
<
* Connection #0 to host doi.org left intact
Frames Catherine White
  • 27,368
  • 21
  • 87
  • 137

1 Answers1

0

I guess there is no such standard yet, but Link header: https://www.w3.org/wiki/LinkHeader could expose this information.

But personally, I won't rely too much on it. For example, a server could start sending a new content type and still NOT expose it via this header.

It might be useful to check the API response headers frequently, via manual or automated means for any changes.

gargkshitiz
  • 2,130
  • 17
  • 19