realbasic-nug
[Top] [All Lists]

Re: httpsocket post encoding

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: httpsocket post encoding
From: Mark Nutter <manutter51 at yahoo dot com>
Date: Sun, 29 Oct 2006 05:34:49 -0800 (PST)
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=CffgJbd688sioqcopkevthIlkLfEemLqSDODu9imVvu5cSAvOWyhCt6P5/lWpduXzHf4sLeXck4jW3hKjJ/2oIuQ07er2owhEzobWM9q3fr2P2aOLKauVTxByhavzEhn0mZeLGRa8BRqZ80zJ44cU2JVolMSzxmSL3ix/q+koA8= ;

--- Tommy <tommy78 at gmail dot com> wrote:

> Hi,
> 
> I'm trying to send some data previously converted to utf-8 to a
>  
> server using a post method.
> 
> Basically this is what I'm doing:
> 
>      socket1.SetRequestHeader("Content-type","charset=UTF-8")
>      result=socket1.post(url,Audioscrobbler.HTTPTIMEOUT)
That's not quite the right format for the Content-type header. 
Try this:

      socket1.SetRequestHeader("Content-type",
         "application/x-www-form-urlencoded; charset=UTF-8")

I'm also not sure whether the SetRequestHeader will work in
connection with SetPostContent.  I do HTTP Posts by setting the
content type as the second argument to SetPostContent:

      socket1.SetPostContent(myContent,
         "application/x-www-form-urlencoded; charset=UTF-8")

Plus that way probably saves you a step, since I assume you're
already calling SetPostContent().


Mark Nutter

Quick and easy regex creation and debugging!
http://www.bucktailsoftware.com/products/regexplorer/


 
____________________________________________________________________________________
Everyone is raving about the all-new Yahoo! Mail 
(http://advision.webevents.yahoo.com/mailbeta/)

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>