import "github.com/goravel/framework/contracts/http"
ctx.Response().String(http.StatusOK, "Hello Goravel")
import (
"github.com/goravel/framework/contracts/http"
)
ctx.Response().Json(http.StatusOK, http.Json{
"Hello": "Goravel",
})
ctx.Response().Json(http.StatusOK, struct {
ID uint `json:"id"`
Name string `json:"name"`
}{
Id: 1,
Front: "Goravel",
})
ctx.Response().Data(http.StatusOK, "text/html; charset=utf-8", []byte("<b>Goravel</b>"))
import "net/http"
ctx.Response().File("./public/logo.png")
import "net/http"
ctx.Response().Download("./public/logo.png", "1.png")
import "github.com/goravel/framework/contracts/http"
ctx.Response().Header("Content", "Goravel").String(http.StatusOK, "Hello Goravel")
ctx.Response().Success().String("Hello Goravel")
ctx.Response().Success().Json(http.Json({
"Hello": "Goravel",
}))
ctx.Response().Redirect(http.StatusMovedPermanently, "https://goravel.dev")
origin := ctx.Response().Origin()