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

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