HaskerDeux

Check-in [a393b4c91b]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Sort out markup in README
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | origin/issue1 | trunk | master
Files: files | file ages | folders
SHA3-256: a393b4c91b133bda8a5e7eb8033adbf913cd8fdb497a47183bf6fbbb96c87ff5
User & Date: base@atomicules.co.uk 2017-10-22 10:56:17.000
Context
2017-10-29
17:10
Handle automatic re-login on each separate curl call

I.e. rather than check the validity of the token each time by making a
curl call to get a list of todos (whatever action is being performed)
just assume the token is valid and wait for the actual action to fail.
Relogin at that point and re-call that action.

It's still messy, but I think this approach is right - it'll just be my
implementation of it that lets the side down. check-in: 76a89c1a9b user: base@atomicules.co.uk tags: master, origin/issue1, trunk

2017-10-22
10:56
Sort out markup in README check-in: a393b4c91b user: base@atomicules.co.uk tags: master, origin/issue1, trunk
10:44
Enable auto-login if token has expired

Note: I am aware this is terribly unhaskelly, but making it work was my
main aim, making it less terrible will come. There's also a fair bit of
repetition here.

This tries to get a list of todos whatever the command and checks the
response for an invalid csrf token, if that occurs it removes the file
and calls login again.

This means that if you are actually calling for a list of todos it ends
up doing it twice which is a bit rubbish really. It would be nicer for
it to:

1. Call whatever command is asked for
2. Catch a invalid_csrf_token in the response
3. Re-login
4. Continue to call the original command

It might never be that good, but I do hope at least to get rid of all
the if/then/else though. check-in: e53b9e78fb user: base@atomicules.co.uk tags: master, origin/issue1, trunk

Changes
Unified Diff Side-by-Side Diff Patch
Changes to README.markdown.