hertz icon indicating copy to clipboard operation
hertz copied to clipboard

feat: add `PostFormMap` and `GetPostFormMap` to `RequestContext`

Open snowykami opened this issue 1 year ago • 0 comments

What type of PR is this?

feat

Check the PR title.

  • [x] This PR title match the format: <type>(optional scope): <description>
  • [x] The description of this PR title is user-oriented and clear enough for others to understand.
  • [x] Attach the PR updating the user documentation if the current PR requires user awareness at the usage level. User docs repo

(Optional) Translate the PR title into Chinese.

RequestContext添加 PostFormMapGetPostFormMap 方法

(Optional) More detailed description for this PR(en: English/zh: Chinese).

en: Clients can use map for form submission in the request body's form-data or x-www-form-urlencoded, for example attr[k1]=v1&attr[k2]=v2&attr[k3]=v3. The method PostFormMap("attr") can be used to obtain the map {"k1": "v1", "k2": "v2", "k3": "v3"}. This method is implemented by referring to gin.Context.PostFormMap. Map can be used more conveniently for form data transmission.

zh(optional):

(Optional) Which issue(s) this PR fixes:

(Optional) The PR that updates user documentation:

snowykami avatar Sep 05 '24 16:09 snowykami