Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

URL to Metadata  RSS feed

Ron McLeod
Saloon Keeper
Posts: 1600
Android Angular Framework Eclipse IDE Java Linux MySQL Database Redhat TypeScript
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am designing/implementing a RESTful web service to manage a wireless network. For each resource, I want to be able to provide metadata describing the resource and it's attributes. In the response to a GET/HEAD, I am providing a http Link header (see network trace below) with a URL to the metadata.

Does this seem like a reasonable approach? If not, any suggestions or pointers?

GET /config/enb HTTP/1.1
Connection: keep-alive
Accept: application/json
Cache-Control: no-cache
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.107 Safari/537.36
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-GB,en;q=0.8,en-US;q=0.6,es;q=0.4,fr;q=0.2,ja;q=0.2

HTTP/1.1 200 OK
Date: Wed, 05 Aug 2015 17:09:52 GMT
Last-Modified: Wed, 05 Aug 2015 17:09:52 GMT
Server: Platform Manager
Link: </config/enb/metadata>; rel="metadata"
Content-Type: application/json
Connection: keep-alive
Transfer-Encoding: chunked

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!