curl::transfer return to variable

Homepage Clovertech Forums Cloverleaf curl::transfer return to variable

  • Creator
    Topic
  • #118809
    David Speare
    Participant

    Hey All –

     

    i’m trying to put a curl::transfer http return to a variable so i can parse it.  The post is happening, but the return value is 0 rather than the actual return from the web server.

     

    set v [curl::transfer -verbose 1 -url $endpoint -post 1 -postfields $msg -httpheader $headers ]

     

    what am i missing here?

Viewing 0 reply threads
  • Author
    Replies
    • #118810
      Charlie Bursell
      Participant

      Try this:

      set rtnVal “”
      set v [::curl::transfer -verbose 1 url $endpoint post 1 postfields $msg httpheader $headers  bodyvar rtnVal]

      The variable v is the return status while rtnVal will be the returned response
      <pre id=”mkup_code_0″ class=”sh_tcl sh_sourceCode”> </pre>

Viewing 0 reply threads
  • You must be logged in to reply to this topic.

Forum Statistics

Registered Users
5,117
Forums
28
Topics
9,292
Replies
34,435
Topic Tags
286
Empty Topic Tags
10