Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

HTTP Post with dynamic values

 [1/3] from: mstein:egrad at: 12-Apr-2004 16:18


This is the first time that I've used Rebol and I am having a problem with what is probably a simple syntax issue. I need to post form variables to a page and read the resulting page back into a variable for further processing. The form variables contain dynamic elements. I see how I can use rejoin to combine the dynamic elements into the string but I don't know how to then pass that resultant string to read/custom. The command that I need to execute is: read/custom http://www.example.com/GCA00P00/WIQ1/WINQ120[ post M12_SEL_DINI=89T4810&K01=WINQ120&K02=89T4810&K03=&K04=&K05=0&K06=&DFH_STATE _TOKEN=abokyfjg&DFH_MAP_STATE_TOKEN ] where the values for the first and third parameters need to be inserted through variable substitution. After processing, the resultant filename should also be this variable + ".txt" Can I create a string with rejoin and pass that string to read/custom? Is there some other approach that I should take? Many thanks in advance. Marc Stein

 [2/3] from: tomc:darkwing:uoregon at: 12-Apr-2004 14:47


On Mon, 12 Apr 2004, Marc Stein wrote:
> This is the first time that I've used Rebol and I am having a problem with > what is probably a simple syntax issue. I need to post form variables to a
<<quoted lines omitted: 7>>
> "M12_SEL_DINI=89T4810&K01=WINQ120&K02=89T4810&K03=&K04=&K05=0&K06=&DFH_STATE > _TOKEN=abokyfjg&DFH_MAP_STATE_TOKEN="
write to-file join var-X ".txt" read/custom url ['POST rejoin [ "M12_SEL_DINI=" var-1 "&K01=WINQ120&K02=89T4810&K03=" var-3 "bla bla" ]] note the tick before post ... or use "POST" in quotes

 [3/3] from: andreas::bolka::gmx::net at: 13-Apr-2004 3:46


Monday, April 12, 2004, 11:47:29 PM, Tom wrote:
> write to-file join var-X ".txt" read/custom url ['POST rejoin [ > "M12_SEL_DINI=" var-1 > "&K01=WINQ120&K02=89T4810&K03=" var-3 > "bla bla" > ]]
i fear you are missing a 'reduce here: write to-file join var-X ".txt" read/custom url reduce [ 'POST rejoin [ "M12_SEL_DINI=" var-1 "&K01=WINQ120&K02=89T4810&K03=" var-3 "bla bla" ] ] -- Best regards, Andreas

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted