0

我正在POST向一个 URL 传递一个请求,其中包含一个包含转义的 unicode 字符的字符串。检查被调用服务器上的日志时,unicode 字符未转义。

我的代码:

SomeClass.post("path/to/method", :body => "<tag>This is a unicode character: &#40837;</tag>")

登录path/to/method

Parameters: {"tag"=>"This is a unicode character: 龅"}

如何告诉 HTTParty 不要取消转义转义字符?

更新

即使它以纯字符串的形式发送,它似乎&#40837;也被拆分了。我不能让 & 号转义,它需要按原样转义。&POST

4

0 回答 0