Grails Basic Authentication credentials passed in URL -


i'm trying access url fetch json file grails application, not find way pass authentication credentials.

i'm trying code pass authentication

string url = 'http://urlthatiwanttogoto.com' string id = 'my_id' string pw = 'my_pw' string website = 'http://my_id:my_pw@urlthatiwanttogoto.com'  string jsonfile = new jsonslurper().parsetext(new url(website).text) 

but i'm still getting 401 errors.


Comments

Popular posts from this blog

html - height not adding height to a empty div -

Oracle SQL. How to select specific IDs where value of columns specify criteria? -

python - Robot Framework location and name of keyword -