Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Posterous API issue

Hello,

I am trying make a post to my posterous blog from within my iPhone app with the following code but I always got 404 error.

Yet to mention, when I try this url method in browser it works perfectly fine there.

Check my code here: http://pastie.org/981549

Can anyone help me in cracking this issue out!

— asked May 28th 2010 by Altaf Sayani
  • authentication
  • posterous
  • xhr
0 Comments

2 Answers

  • Accepted Answer

    Try this

    xhr.open('POST','http://somepage.com');
    xhr.setRequestHeader('Authorization','Basic'+Ti.Utils.base64encode(username+':'+password));
    xhr.send({title:'check me out',media:image});
    
    — answered May 28th 2010 by Daniel Lim
    permalink
    0 Comments
  • @Daniel Thanks for the help, It works perfectly fine now.

    — answered May 28th 2010 by Altaf Sayani
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.