1
0
mirror of https://github.com/labstack/echo.git synced 2024-12-24 20:14:31 +02:00

Update docs

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana 2015-07-02 23:21:21 -07:00
parent 10c44a6f8c
commit d70ad0a6c7
4 changed files with 41 additions and 1 deletions

View File

@ -6,6 +6,8 @@
Use `req.ParseMultipartForm(16 << 20)` for manually parsing multipart form. It gives
us an option to specify the maximum memory used while parsing the request body.
## Server
`server.go`
```go
@ -67,6 +69,8 @@ func main() {
}
```
## Client
`index.html`
```html

View File

@ -3,6 +3,8 @@
- Streaming multipart/form-data file upload
- Multiple form fields and files
## Server
`server.go`
```go
@ -87,6 +89,8 @@ func main() {
}
```
## Client
`index.html`
```html

View File

@ -3,6 +3,8 @@
- Send data as it is produced
- Streaming JSON response with chunked transfer encoding
## Server
`server.go`
```go
@ -53,9 +55,13 @@ func main() {
}
```
## Client
`curl localhost:1323`
```js
## Output
```sh
{"Altitude":-97,"Latitude":37.819929,"Longitude":-122.478255}
{"Altitude":1899,"Latitude":39.096849,"Longitude":-120.032351}
{"Altitude":2619,"Latitude":37.865101,"Longitude":-119.538329}

View File

@ -1,5 +1,7 @@
## WebSocket
## Server
`server.go`
```go
@ -38,6 +40,8 @@ func main() {
}
```
## Client
`index.html`
```html
@ -79,5 +83,27 @@ func main() {
</html>
```
## Output
`Client`
```sh
Hello, Client!
Hello, Client!
Hello, Client!
Hello, Client!
Hello, Client!
```
`Server`
```sh
Hello, Server!
Hello, Server!
Hello, Server!
Hello, Server!
Hello, Server!
```
## [Source Code](https://github.com/labstack/echo/blob/master/recipes/websocket)