发布请求中的换行符 [英] Newline character in post request

查看:141
本文介绍了发布请求中的换行符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想发送换行字符作为发布请求(文本)变量值的一部分.我正在使用wget触发请求.我该如何编码?

I want to send new-line-character as part of a value of a post request (text)variable. I am using wget to fire the request. How do I code that ?

推荐答案

根据 W3C规范,则您以x-www-form-urlencoded格式将换行符编码为%0D%0A,这就是将您交给wget的--post-data选项的方式.

According to the W3C spec, you encode a line break as %0D%0A in the x-www-form-urlencoded format -- which is what you hand to the --post-data option to wget.

这篇关于发布请求中的换行符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆