Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Bypassing a nag web page when using REST

by talexb (Chancellor)
on Feb 06, 2008 at 21:08 UTC ( [id://666668]=perlquestion: print w/replies, xml ) Need Help??

talexb has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying hard to finish off a web/REST application and I'm left with one intriguing question. The web side of the application has a nag screen that is presented as soon as a user logs on, to remind them that some of their projects contain stale files, if that's the case. If there are no stale files, the first web page presented is the project listing page.

For RESTful access, I'd like to be able to skip the nag page and go straight to the project page, but the way I've built this application, I determine whether it's a web or REST (output either HTML or XML) at the beginning of the request. That just decides which web/templates sub-directory is used -- otherwise the application code is the same. So I'm trying to avoid getting the nag page during RESTful access, without looking at what the web/REST setting is.

I think I may have to cheat and look anyway, but it's something I'd prefer not to do. THoughts?

Alex / talexb / Toronto

"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

Replies are listed 'Best First'.
Re: Bypassing a nag web page when using REST
by jaldhar (Vicar) on Feb 06, 2008 at 21:15 UTC

    Maybe I'm missing something but couldn't you just have an empty nag template in the web/templates/REST directory?

    --
    જલધર

      Actually, thanks to your response, I think I've figured out the solution .. have the XML nag template sym-link to the project list template, so even though the application thinks it's nagging, the REST requester gets the right information anyway.

      Alex / talexb / Toronto

      "Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

Re: Bypassing a nag web page when using REST
by Anonymous Monk on Feb 07, 2008 at 08:07 UTC
    What is "web/REST"?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://666668]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (1)
As of 2024-04-19 00:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found