Skip to content

Commit

Permalink
Update basic_usage.md
Browse files Browse the repository at this point in the history
  • Loading branch information
AsterDY authored Sep 20, 2024
1 parent 0836c9b commit 634cc34
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ func main() {
req.Header.Set("token", "1")
customReq, err := generic.FromHTTPRequest(req) // Considering that businesses might use third-party HTTP requests, you can create your own conversion function
// customReq *generic.HttpRequest
// Since the HTTP generic method is obtained from the HTTP request via BAM rules, it's okay to leave it empty
// Since the HTTP generic method is obtained from the HTTP request via [Thrift-HTTP Mapping's IDL Standards](https://www.cloudwego.cn/docs/kitex/tutorials/advanced-feature/generic-call/thrift_idl_annotation_standards/), it's okay to leave it empty
resp, err := cli.GenericCall(ctx, "", customReq)
realResp := resp.(*generic.HTTPResponse)
realResp.Write(w) // Write back to ResponseWriter, used for HTTP gateway
Expand Down

0 comments on commit 634cc34

Please sign in to comment.