Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update engine docs #733

Merged
merged 16 commits into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,7 @@ h.POST("/user", func(c context.Context, ctx *app.RequestContext) {

### SetFormValueFunc

Set the FormValue function.
If the default method provided by the [FormValue](#formvalue) function to obtain the value of the key does not meet the requirements, users can use this function to customize the method of obtaining the value of the key.

Function Signature:

Expand Down Expand Up @@ -1346,7 +1346,9 @@ h.Use(func(c context.Context, ctx *app.RequestContext) {

### SetClientIPFunc

Set the address of the client IP.
If the default method provided by the [ClientIP](#clientip) function does not meet the requirements, users can use this function to customize the way to obtain the client ip.

This function can be used in scenarios where you want to obtain an ip from the `X-Forwarded-For` or `X-Real-IP` header even if a remote ip exists (multiple proxies, want to obtain the initial ip from the `X-Forwarded-For` or `X-Real-IP` header).

Function Signature:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ func (ctx *RequestContext) AbortWithStatusJSON(code int, jsonObj interface{})

### SetBodyStream

Set Body Stream and optional Body Size.
Set Body Stream and optional Body Size. This function is used for streaming processing on Hertz Server, as detailed in [Streaming](/docs/hertz/tutorials/basic-feature/engine/#streaming).

> Note: When the bodySize is less than 0, all data is written. When it is greater than or equal to 0, data is written based on the set bodySize size.

Expand Down
Loading
Loading