Add beforeSend and dataType option to prefetch

Takes are of #226.