Channel Documentation

This feature provides a place for a single Markdown document to be stored and presented at the /doc endpoint of a channel.

http://hub/channel/stumptown/doc

Reading the docs

By default the raw document will be returned for a GET request.

Request:

curl -X GET http://hub/channel/stumptown/doc

Response: 200 OK

# Stumptown Channel
Great coffee provided over TCP/IP!

If the text/html Accept header is provided the document will be parsed as Markdown and rendered as HTML.

Request:

curl -X GET http://hub/channel/stumptown/doc -H 'Accept: text/html'

Response: 200 OK

<h1>Stumptown Channel</h1>
<p>Great coffee provided over TCP/IP!</p>

Updating the docs

Creating a new document requires a PUT request with your document sent to the /doc endpoint of your channel.

Request:

curl -X PUT http://hub/channel/stumptown/doc -d 'Your documentation goes here!'

Response: 200 OK

Your documentation goes here!

Deleting the docs

Deleting just requires a DELETE request be sent to the /doc endpoint of your channel.

Request:

curl -X DELETE http://hub/channel/stumptown/doc

Response: 204 No Content

Tags: channel