Fixed media type typo, added better support of non-basic auth endpoints