Malformed URL ... HELP!

Any ideas why this would be throwing a malformed URL error?

http://www.mydomain.com/api.php?Call=Student.Authenticate&RequestObject={ "StudentUserId":"johnsmith" }

It delivers correct results when testing through Firefox, but the same URL in Corona gives me an error.

What about escaping the data?

local url = require("socket.url") local siteURL = 'http://www.mydomain.com/api.php?Call=Student.Authenticate&RequestObject='..url.escape('{ "StudentUserId":"johnsmith" }');

That did the trick!   I had tried using url.escape but it didn’t seem to work.  When I did it only to the request data, it worked!  Thank you!

What about escaping the data?

local url = require("socket.url") local siteURL = 'http://www.mydomain.com/api.php?Call=Student.Authenticate&RequestObject='..url.escape('{ "StudentUserId":"johnsmith" }');

That did the trick!   I had tried using url.escape but it didn’t seem to work.  When I did it only to the request data, it worked!  Thank you!