Hey Derek,
Thats great feedback! Cheers!
The main reason I hadnt manage to get away from case class or such
because i had:
val header = Can !! request.request.getHeader(Authorization)
in the base trait. This is such common functionality I dont really
want to repeat stuff like that, so thats
I suppose I have a preference for objects when state is not important.
Perhaps you could use
def header(request : Req) = Can !!
request.request.getHeader(Authorization)
and in the apply methods you can use Can.map to process it:
def apply(req : Req, realm : String, authFunc : Authenticate)(...)
Ok, i've refactored a whole bunch of stuff.
I used a partial function :-) All a user need to now is something
like:
object SimpleBasicAuth extends HttpBasicAuthentication {
def verified_? = {
case((user, pass, req)) = {
if(user == tim pass == badger){
true
} else {
Guys,
Im looking at the LiftResponse subclasses in net.liftweb.http, and I
must say, the layout makes no sense what so ever! lol.
We have:
http://github.com/dpp/liftweb/tree/master/lift%2Fsrc%2Fmain%2Fscala%2Fnet%2Fliftweb%2Fhttp%2FWsResponse.scala
and
Yeah I agree - after I posted that on reflection it wasn't the best
name choice.
Im right in saying that this moving around wont break code for anyone
will it?
import net.liftweb.http._ // will still pull all the classes right?
Cheers, Tim
On Nov 22, 6:41 pm, Marius [EMAIL PROTECTED] wrote:
As long as FQCN remains the same, it should be fine.
On Nov 22, 8:46 pm, Tim Perrett [EMAIL PROTECTED] wrote:
Yeah I agree - after I posted that on reflection it wasn't the best
name choice.
Im right in saying that this moving around wont break code for anyone
will it?
import
I like partial functions :) The really nice thing is that you can use
matching. Looks good!
Derek
On Sat, Nov 22, 2008 at 7:47 AM, Tim Perrett [EMAIL PROTECTED] wrote:
Ok, i've refactored a whole bunch of stuff.
I used a partial function :-) All a user need to now is something
like: