2

I've coded this:

var serviceURL = "..../MaterialCollection(MaterialID='" + materialID + "')";

$.ajax({
    type: "GET",
    url: serviceURL,
    contentType: "application/json; charset=utf-8",
    dataType: "json",
    success: callbackSuccess,
    error: callbackError,
});

The thing is that serviceURL is getting automatically encoded, that is ( is translated to %28 and ) is translated to %29. I don't want this URL to be automatically encoded. What am I supposed to do?

Thank you. Regards

6
  • What browser is this under? How are you testing it? Chrome sends the request to the proper URL.
    – Blender
    Apr 19, 2013 at 8:59
  • at which point it is "automatically encoded", and why do you think that is an issue?
    – eis
    Apr 19, 2013 at 9:01
  • Chrome, latest released. It's encoded in the browser when I click on Network traffic I can see the URL is encoded.
    – marco_sap
    Apr 19, 2013 at 9:02
  • 1
    it's an issue because my back-end server doesn't read that format. It expects ( ) and not %28 and %29. In between my client and the back-end server, there's a ProxyServlet (JEE6 - cloud) which redirects to my back-end. I might be able to translate the URI back to ( ) (i.e. decode the URI which I'm getting from AJAX) but I don't like it. I would like AJAX not to make this automatic translation. Isn't that possible?
    – marco_sap
    Apr 19, 2013 at 9:10
  • 1
    Why you don't like to decode it? That encoded URL is correct and you have to decode it. That's it. Apr 19, 2013 at 9:40

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.