MapParams describes the query string parameters in a HTTP request. MapParams must appear in a Method HTTP expression to map the query string parameters with the Method's Payload. MapParams accepts one optional argument which specifes the Payload attribute to which the query string parameters must
(args ...any)
| 760 | // }) |
| 761 | // }) |
| 762 | func MapParams(args ...any) { |
| 763 | if len(args) > 1 { |
| 764 | eval.TooManyArgError() |
| 765 | return |
| 766 | } |
| 767 | e, ok := eval.Current().(*expr.HTTPEndpointExpr) |
| 768 | if !ok { |
| 769 | eval.IncompatibleDSL() |
| 770 | return |
| 771 | } |
| 772 | var mapName string |
| 773 | if len(args) > 0 { |
| 774 | mapName, ok = args[0].(string) |
| 775 | if !ok { |
| 776 | eval.InvalidArgError("string", args[0]) |
| 777 | } |
| 778 | } |
| 779 | e.MapQueryParams = &mapName |
| 780 | } |
| 781 | |
| 782 | // MultipartRequest indicates that HTTP requests made to the method use |
| 783 | // MIME multipart encoding as defined in RFC 2046. |