The viscosity of an active suspension of E. coli bacteria is determined experimentally as a function of the shear rate using a Y-shaped microfluidic channel. From the relative suspension viscosity, we identify rheological thickening and thinning regimes as well as situations at low shear rate where the viscosity of the bacteria suspension can be lower than the viscosity of the suspending fluid. In addition, bacteria concentration and velocity profiles in the bulk are directly measured in the microchannel.