gin-gonic / gin

Gin is a HTTP web framework written in Go (Golang). It features a Martini-like API with much better performance -- up to 40 times faster. If you need smashing performance, get yourself some Gin.
https://gin-gonic.com/
MIT License
78.01k stars 7.97k forks source link

$ go run example.go #4057

Open khtabj10 opened 1 day ago

khtabj10 commented 1 day ago

![Screenshot_٢٠٢٤٠٩١٧-٢٠١٥٤٠](https://github.com/user-attachments/assets/b67fa28e-d369 Screenshot_٢٠٢٤٠٩١٢-٠٨٤٩١٢

Description

How to reproduce

package main

import (
    "github.com/gin-gonic/gin"
)

func main() {
    g := gin.Default()
    g.GET("/hello/:name", func(c *gin.Context) {
        c.String(200, "Hello %s", c.Param("name"))
    })
    g.Run(":9000")
}

Expectations

$ curl http://localhost:9000/hello/world
Hello world

Actual result

$ curl -i http://localhost:9000/hello/world
<YOUR RESULT>

Environment

khtabj10 commented 1 day ago

khtabj109@gmail.com

khtabj10 commented 1 day ago

![Uploading Screenshot_٢٠٢٤٠٩١٢-٠٨٥٠٢٥.jpg…]()

khtabj10 commented 1 day ago

[Uploading tone.xml…]()

khtabj10 commented 1 day ago

خطاب حاسم محمد

JimChenWYU commented 22 hours ago
image

Are you sure? what's your go version and gin framework version?