HTTP Post request with tab delimited field

会有一股神秘感。 提交于 2020-01-06 19:53:40

问题


I've been asked to set up a web service for account creation. The inbound HTTP Post request contains a single formatted field containing tab delimited fields with a header line wrapped in tags.

Here's a sample:

accountRequest=<NewUser>
userName password fName lName
ABC123 wzbtw88g Joe Bloggs
</NewUser>

Can anyone help me understand how to parse it with Classic ASP?


回答1:


extract the values into a string and do something like this

<%

str="userName   password    fName   lName   ABC123  wzbtw88g    Joe Bloggs"

arr=split(str,vbTab)

for i=lbound(arr) to ubound(arr)
    response.write i & "=" & arr(i) &"<BR>"
next

%>



来源:https://stackoverflow.com/questions/9026654/http-post-request-with-tab-delimited-field

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!