If dataType is assigned give it precedence over the type of the url extension. Added a case for type text.