Quantcast
Channel: Fatal Error :1:1: Content is not allowed in prolog - Stack Overflow
Viewing all articles
Browse latest Browse all 8

Answer by Daniel Nelson for Fatal Error :1:1: Content is not allowed in prolog

$
0
0

Looks like you forgot adding correct headers to your get request (ask the REST API developer or you specific API description):

HttpURLConnection connection = (HttpURLConnection)url.openConnection();connection.header("Accept", "application/xml")connection.setRequestMethod("GET");connection.connect();

or

connection.header("Accept", "application/xml;version=1")

Viewing all articles
Browse latest Browse all 8

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>