Skip to content

Commit

Permalink
Merge pull request #836 from rnotorni/hotfix/issue835_NewEventFromHTT…
Browse files Browse the repository at this point in the history
…PRequest

Modify doc NewCloudEventFromHTTPRequest -> NewEventFromHTTPRequest
  • Loading branch information
duglin authored Apr 7, 2023
2 parents bd5243d + de1dfea commit da161f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func main() {

```go
func handler(w http.ResponseWriter, r *http.Request) {
event, err := cloudevents.NewCloudEventFromHTTPRequest(r)
event, err := cloudevents.NewEventFromHTTPRequest(r)
if err != nil {
log.Print("failed to parse CloudEvent from request: %v", err)
http.Error(w, http.StatusText(http.StatusBadRequest), http.StatusBadRequest)
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func main() {

```go
func handler(w http.ResponseWriter, r *http.Request) {
event, err := cloudevents.NewCloudEventFromHTTPRequest(r)
event, err := cloudevents.NewEventFromHTTPRequest(r)
if err != nil {
log.Print("failed to parse CloudEvent from request: %v", err)
http.Error(w, http.StatusText(http.StatusBadRequest), http.StatusBadRequest)
Expand Down

0 comments on commit da161f9

Please sign in to comment.