kataras / iris

The fastest HTTP/2 Go Web Framework. New, modern and easy to learn. Fast development with Code you control. Unbeatable cost-performance ratio :rocket:
https://www.iris-go.com
BSD 3-Clause "New" or "Revised" License
25.14k stars 2.48k forks source link

URLParam() and URLParams() only return the first param? #1514

Closed Sallery-X closed 4 years ago

Sallery-X commented 4 years ago

?pageNumber=1&pageSize=wxasd just return the pagenumber

kataras commented 4 years ago

URLParam("pageNumber") will return the "1", URLParam("pageSize") will return the "wxasd" value. URLParams will a map[string]string, if more than one values with the same key then the values are separated by comma ,. e.g. in your case URLParams() will return {pageNumber: "1", pageSize: "wxasd"}. Whats the problem @SalleryWang? Show me some code so I can help you

Sallery-X commented 4 years ago

i think so!but just return the first! it is confuzed

ThanosWei 邮箱:ThanosWei@163.com

签名由 网易邮箱大师 定制

On 05/16/2020 01:47, Gerasimos (Makis) Maropoulos wrote:

URLParam("pageNumber") will return the "1", URLParam("pageSize") will return the "wxasd" value. URLParams will a map[string]string, if more than one values with the same key then the values are separated by comma ,. e.g. in your case URLParams() will return {pageNumber: 1", pageSize: "wxasd"}. Whats the problem @SalleryWang? Show me some code so I can help you

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

Sallery-X commented 4 years ago

i use the version 11

ThanosWei 邮箱:ThanosWei@163.com

签名由 网易邮箱大师 定制

在2020年05月16日 11:03,SalleryWang 写道: i think so!but just return the first! it is confuzed

ThanosWei 邮箱:ThanosWei@163.com

签名由 网易邮箱大师 定制

On 05/16/2020 01:47, Gerasimos (Makis) Maropoulos wrote:

URLParam("pageNumber") will return the "1", URLParam("pageSize") will return the "wxasd" value. URLParams will a map[string]string, if more than one values with the same key then the values are separated by comma ,. e.g. in your case URLParams() will return {pageNumber: 1", pageSize: "wxasd"}. Whats the problem @SalleryWang? Show me some code so I can help you

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

kataras commented 4 years ago

Why you don't upgrade to the v12 in order to check if that fixes your issue?

Sallery-X commented 4 years ago

i have upgrade to v12. it doesn‘t work

ThanosWei 邮箱:ThanosWei@163.com

签名由 网易邮箱大师 定制

On 05/17/2020 04:44, Gerasimos (Makis) Maropoulos wrote:

Why you don't upgrade to the v12 in order to check if that fixes your issue?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

kataras commented 4 years ago

@SalleryWang I've just tried it and it works here, could you please share us the code snippet you use and the url value so I can test it locally? (see ctx.Request().URL.Query() too)

Sallery-X commented 4 years ago

thx