packages feed

pi-calculus-0.0.4: testing/follow.pi

let follow(ch,r) = (out(ch,r);in(ch,resp:HttpResponse);
    let list(c,_,h,_) = resp in
        if c = 302 
            then let req = httpReq(getHeader("location",resp),headers(),httpGet()) in &follow(ch,req) 
            else out(stdout,h))