Instantly share code, notes, and snippets.

Embed
What would you like to do?
New style ICF handler example - see http://github.com/qmacro/coffeeshop/blob/master/coffeeshop.py#L524 for comparison
method IF_HTTP_EXTENSION~HANDLE_REQUEST.
handler( p = '^/$' h = 'Y_COF_H_MAINPAGE' ).
handler( p = '^/channel/submissionform$' h = 'Y_COF_H_CHANSUBMITFORM' ).
handler( p = '^/channel/([^/]+)/subscriber/submissionform$' h = 'Y_COF_H_CHNSUBSUBMITFORM' ).
handler( p = '^/channel/([^/]+)/subscriber/$' h = 'Y_COF_H_CHNSUBCNT' ).
handler( p = '^/channel/([^/]+)/subscriber/([^/]+)/$' h = 'Y_COF_H_CHNSUB' ).
dispatch( server ).
endmethod.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment