cloudwego / cloudwego/hertz

[Question]: How do I implement a Java servlet-like forward with the URL address unchanged?

Open
#724 5 comments 0 reactions 1 assignee Claimed by @li-jin-gou View on GitHub
question
Dominant language
Go
Stars
7.4k
Forks
643
Avg merge
14h 5m
Merged PRs (30d)
2

Description

**Describe the Question**

How do I implement a Java servlet-like forward with the URL address unchanged?

**Reproducible Code**

```go
c.Redirect(consts.StatusFound, []byte("/test"))
```

**Expected behavior**

Redirect jump, URL address remains unchanged
Although redirected now, the browser URL has also changed

**Hertz version:**

0.6.2

**Environment:**

The output of `go env`.

**Additional context**

Add any other context about the question here.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.