> For the complete documentation index, see [llms.txt](https://iris-go.gitbook.io/iris/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://iris-go.gitbook.io/iris/requests/url-path-params.md).

# URL Path Parameters

**Content-Type Requested:&#x20;*****\****

```go
// Register the route...
app.Get("/{name}/{age:int}/{tail:path}", handler)

func handler(ctx iris.Context) {
    params := ctx.Params()

    name   := params.Get("name")
    age    := params.GetIntDefault("age", 18)
    tail   := strings.Split(params.Get("tail"), "/")
}
```

## Bind

The `Context.ReadParams(ptr interface{}) error` is the method which binds URL Dynamic Path Parameters from client request to a custom value.

Let's create our Go structure.

```go
type myParams struct {
	Name string   `param:"name"`
	Age  int      `param:"age"`
	Tail []string `param:"tail"`
}
```

Now, the handler which reads the URL and binds to a "myParams" value.

```go
func handler(ctx iris.Context) {
    var p myParams
    if err := ctx.ReadParams(&p); err != nil {
        ctx.StopWithError(iris.StatusInternalServerError, err)
        return
    }
}
```

**Request**

```sh
http://localhost:8080/kataras/27/iris/web/framework
```

**Result**

```go
myParams{
    Name: "kataras",
    Age:  27,
    Tail: []string{"iris", "web", "framework"},
}
```
