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

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -