使用post方法发送Value1 | Value2 | Value3 | Value4格式的值 [英] Sending values in Value1|Value2|Value3|Value4 format using post method
问题描述
你好
我必须发布一些将值通过管道分离到第三方的数据.我使用的内容类型是''application/x-www-form-urlencoded''
.
但是我在网络上的某个地方读到,``应用程序/x-www-form-urlencoded''用于名称/值对,以与号(&
)分隔,名称与值之间用等号( =
).
例如. MyVariableOne=ValueOne&MyVariableTwo=ValueTwo
但是我必须使用post方法将值作为Value1|Value2|Value3|Value4
发送.
使用''application/x-www-form-urlencoded''
时,没有得到想要的结果.
有什么出路吗?
谢谢
已添加/更正了CODE标签-LOSMAC [/EDIT]
Hello
I have to post some data where the values are pipe separated to a third party. Content type used by me is ''application/x-www-form-urlencoded''
.
But I read somewhere on the net that ''application/x-www-form-urlencoded'' is used for name/value pairs are separated by the ampersand (&
), and names are separated from values by the equal symbal (=
).
Eg. MyVariableOne=ValueOne&MyVariableTwo=ValueTwo
But I have to send my values as Value1|Value2|Value3|Value4
using post method.
While using ''application/x-www-form-urlencoded''
I am not getting the desired results.
Is there any way out?
Thanx
CODE tags added/corrected - LOSMAC[/EDIT]
推荐答案
使用 ^ ]函数可将字符串除以指定为数组的一个或多个定界字符.
Use Split()[^] function to "divide" string by one or more delimited characters specified into an array.
这篇关于使用post方法发送Value1 | Value2 | Value3 | Value4格式的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!