fetch mimetype now 'application/json' instead of 'html/text'

also added test

	modified:   app.py
	modified:   test.py