We use microfluidic devices to perform rheological measurements. The main advantages of such devices are the following three points: 1. They allow the study of complex fluids in complex flows (e.g. extensional or Poiseuille flow) which is not possible with a classical rheometer; 2. They allow us to confine the fluid at the length scale of its mesoscopic entities; 3. They allow us to study in great details the role of the nature of the surface that bound the flow. – We point out the role of the nature of the surface in the flow of complex fluids. Surfaces change the slip velocity but also rule the shear rate at the wall. For the same applied shear stress at the wall, various shear rates may be obtained as a function of the nature of the surface; – In the jammed state, there is no universal relationship between the local shear stress and the local shear rate. – The flow curve of wormike micellar solutions is non local.