2
0

Adds Content-Type

This commit is contained in:
Manu Mtz-Almeida
2015-05-13 23:24:27 +02:00
parent 1d0f1f9c05
commit 489af8e7c7
2 changed files with 12 additions and 0 deletions
+10
View File
@@ -6,6 +6,8 @@ Server-sent events (SSE) is a technology where a browser receives automatic upda
[Real world demostration using Gin](http://sse.getgin.io/)
##Sample code
```go
import "github.com/manucorporat/sse"
@@ -38,3 +40,11 @@ data: {"content":"hi!","date":1431540810,"user":"manu"}
```
##Content-Type
```go
fmt.Println(sse.ContentType)
```
```
text/event-stream
```
+2
View File
@@ -8,6 +8,8 @@ import (
"strings"
)
const ContentType = "text/event-stream"
// Server-Sent Events
// W3C Working Draft 29 October 2009
// http://www.w3.org/TR/2009/WD-eventsource-20091029/