【发布时间】:2020-06-06 19:47:20
【问题描述】:
我想在我的 RESTful API 中的 get 方法的查询参数中添加换行符。
这是我在 Postman 中的最终GET URL:-
www.localhost:8091/customRule?someString="this is some string \\n on new line"
我得到了例外:-
java.lang.IllegalArgumentException: Invalid character found in the request target [/customRule?someString=%22this%20is%20some%20string%20\\n%20on%20new%20line%22]. The valid characters are defined in RFC 7230 and RFC 3986
我该如何解决?
【问题讨论】:
-
这对您有帮助吗?它建议使用 %0A。 stackoverflow.com/questions/3871729/…