Good afternoon, I am attempting to build a WCF service that will listen for a webhook call from as website, in my case www.formstack.com. I am able to get the WCF service working and accepting data but the stream is being returned as a long URL formatted text string instead of XML.
This is what is being returned. I ultimately need this into a format that I can then submit it to a database.
FormID=1730225&UniqueID=166942101&Ticket+Number=&System+Number=&Customer+Number=&Customer+Name=&Your +Name=Brad+Swindell&Email=&Score=10+-+Very+Likely&Additional+Feedback=This+is+%22A+Test%22%2C+that+has+%3D+and+%26+symbol%27s+in+it.&Woul d+you+like+this+survey+to+be+anonymous%3F=No&Tech=&Id=
I could try to parse the text by & and = and then replace the +. but I would have to trap every other symbol. Is there a better way to approach this issue?
Formstack Webhook API - https://www.formstack.com/developers/webhooks
I was wondering if VB.Net has a library that can handle this process or if I am going about getting the data from the POST the wrong way?
Any help would be appreciated.
Thanks guys for the help.
Brad Swindell
This is what is being returned. I ultimately need this into a format that I can then submit it to a database.
Quote:
FormID=1730225&UniqueID=166942101&Ticket+Number=&System+Number=&Customer+Number=&Customer+Name=&Your +Name=Brad+Swindell&Email=&Score=10+-+Very+Likely&Additional+Feedback=This+is+%22A+Test%22%2C+that+has+%3D+and+%26+symbol%27s+in+it.&Woul d+you+like+this+survey+to+be+anonymous%3F=No&Tech=&Id=
Code:
Public Function PostSampleMethod(data As Stream) As String Implements IMyService.PostSampleMethod
Dim reader As New StreamReader(data)
Dim xmlString As String = reader.ReadToEnd()
Using w As StreamWriter = File.AppendText("C:\log.txt")
Log(xmlString, w)
End Using
Return Nothing
End Function
I was wondering if VB.Net has a library that can handle this process or if I am going about getting the data from the POST the wrong way?
Any help would be appreciated.
Thanks guys for the help.
Brad Swindell