POST Method HTML
Spire_Jeff
Posts: 1,917
Has anyone successfully coded the ability to connect to a website that requires a POST method with variable data?
I am having a difficult time and I think most of my problems are coming from the way length_array and various string operations are being handled by NetLinx. Basically, I think I need to get the length of the data being submitted and post it before I start sending the data. This means that I need to store the entire output string, then count length, then send the string.
To aid in troubleshooting, I have every line write to a file on the processor immediately following the send_string dvWeb statement. I am getting very odd results and I am trying many different techniques. I have tried using length_array, length_string (even tho it is supposed to be the same), find_string (searching for $0A), and I am about to create my own find_string routine. I have a variable that is 10000 large (well under the 16k-ish problem point). Data has yet to get much bigger than 600, but there is a good chance that it will be in the 5-6k range or larger at times.
Anyone have any suggestions on how to prep the data for transmission and store it? I know there is a reliable way, I am just failing to find it today.
Jeff
I am having a difficult time and I think most of my problems are coming from the way length_array and various string operations are being handled by NetLinx. Basically, I think I need to get the length of the data being submitted and post it before I start sending the data. This means that I need to store the entire output string, then count length, then send the string.
To aid in troubleshooting, I have every line write to a file on the processor immediately following the send_string dvWeb statement. I am getting very odd results and I am trying many different techniques. I have tried using length_array, length_string (even tho it is supposed to be the same), find_string (searching for $0A), and I am about to create my own find_string routine. I have a variable that is 10000 large (well under the 16k-ish problem point). Data has yet to get much bigger than 600, but there is a good chance that it will be in the 5-6k range or larger at times.
Anyone have any suggestions on how to prep the data for transmission and store it? I know there is a reliable way, I am just failing to find it today.
Jeff
0
Comments
but, I've found that with any kind of web interaction, I tend to be very agressive in how strings coming back and/or going out are handled.
For example, I will almost always take incoming data and postpend it to a larger buffer and wait a good long time before acting on it. When I postpend a chunk I put in my own delimiter and when I'm sure we're good 'n done, will go through and rebuild the entire string taking out my delimeters. It is then that I get all the array length stuff and what not.
Here again, I don't know if I'm helping or not. But more info on what you're doing might be helpful for my addled brain...
--John
http://www.amxforums.com/showthread.php?t=5329
I tried looking at the mobile web app, but I am still in timeout for not completing all of my ACE recerts on time. If I don't make any progress tonight, maybe I'll send you a PM and see if you can just copy and paste the post to me in a PM
To elaborate on the problem... I am sending out a POST request to a web page that I created. I have the GET request working fine, but I was trying to avoid the delays that occur when I have more than one submission within a 2 second window. (the approximate timeout time from the web server). I have no idea if the correct data is being sent because of the difficulties in monitoring IP comms. I don't have a switch that I can send all data to my PC, nor have I looked at putting my network card in promiscuous mode to sniff the data. I am relying on posting the data to a file and viewing it after the fact, but that file is not containing the information that I think should be there. I am pretty sure that some of the data is actually being sent correctly to the webserver, but not saved in the file because of the need to specify how many chars to write to a file.
I think I am close, but I will post more helpful info if I am unable to make any further progress.
Jeff
Jeff
A couple of the replies got me thinking along the correct lines again and it is much appreciated.
Jeff