Feature Request: ignore query parameters during encoding
Closed this issue · 1 comments
shawalli commented
I'd like to have the option to ignore a query parameter during encoding if the parameter is empty. For simplicity, empty could be considered the zero value of the type.
If more complex support is desired, this could work with both pointers and values. If it is a pointer-type and nil, it can be considered empty and ignored (if the optional struct-tag option is given). If it is a value and is set to the type's zero-value, it can be considered empty and ignored (if the optional struct-tag option is given). WDYT?
ggicci commented
I guess the omitempty
directive can help: https://github.com/ggicci/httpin/releases/tag/v0.19.0