style: status change to std http status (#758)

This commit is contained in:
baerwang
2024-01-08 11:07:11 +08:00
committed by GitHub
parent c250e850d5
commit b1e4cf9492
8 changed files with 35 additions and 24 deletions

View File

@@ -15,6 +15,8 @@
package main
import (
"net/http"
"github.com/tetratelabs/proxy-wasm-go-sdk/proxywasm"
"github.com/tetratelabs/proxy-wasm-go-sdk/proxywasm/types"
@@ -36,6 +38,6 @@ func onHttpRequestHeaders(ctx wrapper.HttpContext, config HelloWorldConfig, log
if err != nil {
log.Critical("failed to set request header")
}
proxywasm.SendHttpResponse(200, nil, []byte("hello world"), -1)
proxywasm.SendHttpResponse(http.StatusOK, nil, []byte("hello world"), -1)
return types.ActionContinue
}