?

Log in

No account? Create an account
ATOM posting - LiveJournal Client Discussions [entries|archive|friends|userinfo]
LiveJournal Client Discussions

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

ATOM posting [Jan. 16th, 2006|11:41 am]
LiveJournal Client Discussions

lj_clients

[vzaliva]
I am playing with ATOM posting to live journal. My first problem is that it does not return URL of newly created entry. In response to atom posting request I receive:



Location: http://www.livejournal.com/interface/atom/edit/54
Transfer-Encoding: chunked
Content-Type: application/x.atom+xml

<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="http://purl.org/atom/ns#">
  <title xmlns="http://purl.org/atom/ns#">test title</title>
  <summary xmlns="http://purl.org/atom/ns#">test body</summary>
  <link xmlns="http://purl.org/atom/ns#" type="application/x.atom+xml" rel="service.edit" href="http://www.livejournal.com/interface/atom/edit/54" title="test title"/>
  <link xmlns="http://purl.org/atom/ns#" type="text/html" rel="alternate" href="" title="test title"/>
</entry> 



First problem is that Location header supposed to contain URL of newly created entry, something like:

http://www.livejournal.com/users/someuser/123.html

Now it returns 'service.edit' URL which is wrong.

Second problem is that returned entry contains weird LINK element with empty HREF. From what I see there is no way to deduct from server response URL of newly created entry. How people get around this? Is it supposed to be like this or it is just a bug?

Good news is that it seems that when posting from ATOM date is correct and there is no timezone problems I've was encountering earlier when using XMLRPC.
linkReply

Comments:
[User Picture]From: tsutton
2006-01-16 09:12 pm (UTC)
Can you put the code under an LJ cut? It's making my friends page all funny. :D

Cheers
(Reply) (Thread)
[User Picture]From: vzaliva
2006-01-16 10:32 pm (UTC)
done. sorry about that.
(Reply) (Parent) (Thread)
[User Picture]From: tsutton
2006-01-16 10:33 pm (UTC)
No worries, thanks.
(Reply) (Parent) (Thread)