File tree 1 file changed +3
-5
lines changed
1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -94,16 +94,14 @@ They each will listen and respond to incoming HTTP events.
94
94
95
95
#### Function triggered by HTTP request
96
96
97
- When an incoming request is received, your function will be invoked with a standard
98
- Golang [ Context] ( https://golang.org/pkg/context/ ) as the first parameter followed by
99
- two parameters: Golang's [ http.ResponseWriter] ( https://golang.org/pkg/net/http/#ResponseWriter )
100
- and [ http.Request] ( https://golang.org/pkg/net/http/#Request ) .
97
+ When an incoming request is received, your function will be invoked with two parameters:
98
+ Golang's [ http.ResponseWriter] ( https://golang.org/pkg/net/http/#ResponseWriter ) and [ http.Request] ( https://golang.org/pkg/net/http/#Request ) .
101
99
102
100
Then you can use standard Golang techniques to access the request (eg. read the body)
103
101
and set a proper HTTP response of your function, as you can see on the following example:
104
102
105
103
``` go
106
- func Handle (ctx context . Context , res http .ResponseWriter , req *http .Request ) {
104
+ func Handle (res http .ResponseWriter , req *http .Request ) {
107
105
108
106
// Read body
109
107
body , err := ioutil.ReadAll (req.Body )
You can’t perform that action at this time.
0 commit comments