Hello everybody, this is my first posting to this list, and I'm an absolute beginner in terms of programming with synapse. Please be patient with me ;) I've looked in the list archive, but found nothing (probably I used the wrong search items).
Two weeks ago I discovered Laconi.ca, an open source micro blogging
software (f.e. identi.ca), and thought it would be nice to have (free)
pascal support for it. So I started to write some basic procedures to
fetch timelines using the HTTPGetText function, which worked fine.
Next aim was posting a notice. For that the documentation from
Laconi.ca [1] says
----------------------
Login
You have to have a valid login cookie to post. To get one, send an HTTP
POST to http://identi.ca/main/login with the arguments nickname and
password.
Post notice
Once you have login cookies, you can post notices. To send one, submit
an HTTP POST message to http://identi.ca/notice/new with the argument
status_textarea, a string of maximum 140 characters.
----------------------
I have tried to accomplish both steps with
httpsend.THTTPSend.HTTPMethod('POST',[requeststring])
method (see sniplets below). From the login request I receive a
PHPSESSIONID cookie, which I assume is the "valid login cookie" I'll
ask that at the Laconi.ca devel list.
When I try to post a notice with a request like
http://identi.ca/notice/new?status_textarea=testing%20please%20ignore
the HTTP result is 400, the very same as without a prior login.
My question is, whether the cookie set as a result from login is
automatically used for the second request, or if I have to manually
activate the use of the cookie?
Thanks in advance!
Tobias
---- Code sniplets ----
req :=
'http://identi.ca/main/login?nickname='+EncodeURLElement(user.login)+'&password='+EncodeURLElement(user.password);
HTTP.HTTPMethod('POST', req)
...
req :=
'http://identi.ca/notice/new?status_textarea='+EncodeURLElement(themessage);
HTTP.HTTPMethod('POST',req)
---- /Code sniplets ----
[1] http://laconi.ca/trac/wiki/Version0API
--
________________________________________
/ www.diekershoff.net \
| eMail: [EMAIL PROTECTED] |
| jid: [EMAIL PROTECTED] |
\ skype und icq auf nachfrage /
----------------------------------------
\
\
___
{~._.~}
( Y )
()~*~()
(_)-(_)
pgpaxdNFxO8ym.pgp
Description: PGP signature
------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________ synalist-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/synalist-public
