issue in posting an xml content

214 views
Skip to first unread message

kadoudal

unread,
Sep 5, 2010, 1:38:11 PM9/5/10
to Curb - Ruby libcurl Bindings
I have an xml string :

ticket_xml =
"<ticket><ticket_type>get_story_type_from_email_address(to)</
ticket_type><requested_by>from_name</requested_by><name>subject</
name><description>description</description></ticket>"

how can I post it as an xml content ?

request.http_post( Curl::PostField.content('ticket', ticket_xml))

doesn't send it as xml....

thanks for your help

erwin

Todd Fisher

unread,
Sep 6, 2010, 11:29:01 AM9/6/10
to curb---ruby-li...@googlegroups.com
Have you tried setting the Content-Type header?

e.g.

easy.headers['Content-Type'] = 'application/atom+xml'




--
You received this message because you are subscribed to the Google Groups "Curb - Ruby libcurl Bindings" group.
To post to this group, send email to curb---ruby-li...@googlegroups.com.
To unsubscribe from this group, send email to curb---ruby-libcurl-...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/curb---ruby-libcurl-bindings?hl=en.


Todd Fisher

unread,
Sep 6, 2010, 10:19:17 PM9/6/10
to curb---ruby-li...@googlegroups.com
Great

On Mon, Sep 6, 2010 at 1:16 PM, <kado...@gmail.com> wrote:
Thanks , good shot ...

Le , Todd Fisher <todd....@gmail.com> a écrit :

> Have you tried setting the Content-Type header?
>
> e.g.
>
>
> easy.headers['Content-Type'] = 'application/atom+xml'
>
>
>
>
>
> On Sun, Sep 5, 2010 at 1:38 PM, kadoudal kado...@gmail.com> wrote:
>
> I have an xml string :
>
>
>
> ticket_xml =
>
> "get_story_type_from_email_address(to)
> ticket_type>from_namesubject
> name>description/description>"
Reply all
Reply to author
Forward
0 new messages