By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,067 Members | 1,818 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,067 IT Pros & Developers. It's quick & easy.

Get request with string that contains ",jpg"

P: 1
Hi,

Have a strange case where I try to make a GET request using jQuery.

Expand|Select|Wrap|Line Numbers
  1. $.ajax({
  2.         type: 'GET',
  3.         url: 'MyMethod?param=ABC.ABC',
  4.         timeout: 10000,
  5.         contentType: 'application/x-www-form-urlencoded; charset=UTF-8',        
  6.         success: function (data) {
  7.         },
  8.         error: function (xhr, status, error) {      
  9.         }
  10.     });

The method above works fine. But if I change the URL to

'MyMethod?param=ABC.jpg',

it's not working, the method (MyMethod) never gets called. Could anyone explain this?

I'm using jQuery 1.9.1
Nov 27 '14 #1
Share this Question
Share on Google+
2 Replies


Dormilich
Expert Mod 5K+
P: 8,639
it's not working, the method (MyMethod) never gets called.
does that mean the server script fails or that you donít even have a request sent?
Dec 15 '14 #2

Dormilich
Expert Mod 5K+
P: 8,639
note: application/x-www-form-urlencoded is an invalid content-type for GET requests.
Jan 6 '15 #3

Post your reply

Sign in to post your reply or Sign up for a free account.