<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>http get with query string</title>
  <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_thread?p_l_id=&amp;threadId=9109016" />
  <subtitle>http get with query string</subtitle>
  <id>http://developer.cisco.com/c/message_boards/find_thread?p_l_id=&amp;threadId=9109016</id>
  <updated>2013-05-19T08:37:18Z</updated>
  <dc:date>2013-05-19T08:37:18Z</dc:date>
  <entry>
    <title>RE: http get with query string</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=9113082" />
    <author>
      <name>Yaw-Ming Chen</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=9113082</id>
    <updated>2012-12-05T16:57:38Z</updated>
    <published>2012-12-05T16:57:38Z</published>
    <summary type="html"> 
I am not a HTTP protocol expert but I think we can get answer from Tcl manul (not Tcl IVR programming guide)
In Tcl IVR API, not all commands and options are supported.Please refer to programming guide "HTTP command"
&lt;dl&gt;&lt;dt&gt;&lt;a name="M13"&gt;&lt;/a&gt;[b]:http::geturl[/b] [i]url[/i] ?[i]options[/i]?&lt;/dt&gt;&lt;dd&gt;The [b]::http::geturl[/b] command is the main procedure in the package. The [b]-query[/b] option causes a POST operation and the [b]-validate[/b] option causes a HEAD operation; otherwise, a GET operation is performed. The [b]::http::geturl[/b] command returns a [i]token[/i] value that can be used to get information about the transaction. See the STATE ARRAY and ERRORS section for details. The [b]::http::geturl[/b] command blocks until the operation completes, unless the [b]-command[/b] option specifies a callback that is invoked when the HTTP transaction completes. [b]::http::geturl[/b] takes several options:&lt;/dd&gt;&lt;dd&gt;&lt;/dd&gt;&lt;dd&gt;&lt;/dd&gt;&lt;/dl&gt;</summary>
    <dc:creator>Yaw-Ming Chen</dc:creator>
    <dc:date>2012-12-05T16:57:38Z</dc:date>
  </entry>
  <entry>
    <title>RE: http get with query string</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=9112755" />
    <author>
      <name>William Alvord</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=9112755</id>
    <updated>2012-12-05T16:36:43Z</updated>
    <published>2012-12-05T16:36:43Z</published>
    <summary type="html">...so how would I go about initiating an http get request passing a query string??  I fully appreciate being told that I'm doing it the wrong way, but it would be really helpful if I knew how to do it the correct way.</summary>
    <dc:creator>William Alvord</dc:creator>
    <dc:date>2012-12-05T16:36:43Z</dc:date>
  </entry>
  <entry>
    <title>RE: http get with query string</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=9112677" />
    <author>
      <name>Yaw-Ming Chen</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=9112677</id>
    <updated>2012-12-05T16:31:40Z</updated>
    <published>2012-12-05T16:31:40Z</published>
    <summary type="html">It does do a POST
 
&lt;dl&gt;&lt;dt&gt;[b]-query[/b] &lt;em class="m"&gt;query[/i]&lt;/dt&gt;&lt;dd&gt;This flag causes [b]::http::geturl[/b] to do a POST request that passes the [i]query[/i] to the server. The [i]query[/i] must be an x-url-encoding formatted query. The [b]::http::formatQuery[/b] procedure can be used to do the formatting.&lt;/dd&gt;&lt;dt&gt;[b]-queryblocksize[/b] &lt;em class="m"&gt;size[/i]&lt;/dt&gt;&lt;/dl&gt;</summary>
    <dc:creator>Yaw-Ming Chen</dc:creator>
    <dc:date>2012-12-05T16:31:40Z</dc:date>
  </entry>
  <entry>
    <title>http get with query string</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=9109015" />
    <author>
      <name>William Alvord</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=9109015</id>
    <updated>2012-12-05T15:08:58Z</updated>
    <published>2012-12-05T15:01:50Z</published>
    <summary type="html">&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;[color=#006080]I'm trying to do an http get passing a query string.  The following works from the tclsh.  I had wanted to develop the logging app first which is why I approached it this way.
source "tmpsys:lib/tcl/http.tcl"
[/color][color=#006080]set query [::http::formatQuery "one" "1" "two" "2"][/color]
[color=#006080]set Token [::http::geturl "http://1.1.1.1/logging.php" -query $query]
[/color]
Then when I move it into a script on flash, this fails (actually does a post instead of a get):
package require httpios 1.0
set query [::httpios::formatQuery "one" "1" "two" "2"]
[color=#000000]set Token [::httpios::geturl "http://1.1.1.1/logging.php" -query $query]

I'm a tcl beginner so I'm sure that there's something simple I'm overlooking but after googling and searching this forum I'm still stuck.  Any assistance is appreciated.

thanks,
will
[/color]&lt;/pre&gt;</summary>
    <dc:creator>William Alvord</dc:creator>
    <dc:date>2012-12-05T15:01:50Z</dc:date>
  </entry>
</feed>

