Getting Target Host Must Not Be Null Or Set In Parameters In Http Get Method For Android
Please help me to figure out my question answer i tried to find so many times on Google but i cant able to find its solution. First i am getting this exception java.lang.IllegalAr
Solution 1:
Android: howto parse URL String with spaces to URI object?
You should in fact URLEncode the "invalid" characters. Since the string actually contains the complete URL, it's hard to properly URL-encode it. You don't know which slashes / should be taken into account and which not. You cannot predict that on a raw String beforehand. The problem really needs to be solved at a higher level. Where does that String come from? Is it hardcoded? Then just change it yourself accordingly. Does it come in as user input? Validate it and show error, let the user solve itself.
Post a Comment for "Getting Target Host Must Not Be Null Or Set In Parameters In Http Get Method For Android"