473,406 Members | 2,281 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Get request with string that contains ",jpg"

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
2 1326
Dormilich
8,658 Expert Mod 8TB
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
8,658 Expert Mod 8TB
note: application/x-www-form-urlencoded is an invalid content-type for GET requests.
Jan 6 '15 #3

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

Similar topics

2
by: Matt | last post by:
The JSP page needs to send XML request string to another JSP page when the user clicks submit button, I wonder how to get started because when user click submit button, it will send the form to...
9
by: booksnore | last post by:
I am writing some code to search for strings that contain every letter of the alphabet. At the moment I am using the method below to check to see if a string contains every letter of the alphabet....
2
by: Michael Lang | last post by:
Is there anyway to get an anchor passed on a request string.... e.g mypage.aspx#myanch in the mypage code behind i want to be able to get the string "myanch"... Basically I want to navigate...
13
by: nishit.gupta | last post by:
Is their any fuction available in C++ that can determine that a string contains a numeric value. The value cabn be in hex, int, float. i.e. "1256" , "123.566" , "0xffff" Thnx
6
by: stanleyhsieh | last post by:
Hi all! I'm new here! I was wondering how I can check if a string contains only "A-Za-z0-9_" and ".". I tried the following code function check_validstring($check_validstring) { ...
0
by: Borse, Ganesh | last post by:
Hi, Am new to python. May someone please help me know this? How can we check whether one big string contains another small string? E.g. bigstring="python anaconda boa cobra" smallone="boa"
7
by: Karch | last post by:
I need to find the fastest way in terms of storage and searching to determine if a given string contains one of a member of a list of strings. So, think of it in terms of this: I have a string such...
4
by: Jeff | last post by:
Hey ..NET 3.5 I'm trying to search a string to determine if the string contains </table>, but string.Contains don't find it. I've used WebRequest/WebReponse to retrieve the html from a...
1
by: Jon Skeet [C# MVP] | last post by:
On Apr 30, 3:56 pm, Raja <rajesh.mad...@gmail.comwrote: Well, in fact it's *not* working fine - it's not behaving the same on SQL server as it would be in normal code. String.Contains is case-...
8
by: SMJT | last post by:
Does anyone know why the string contains function always returns true if the token is an empty string? I expected it to return false. "AnyOldText".Contains("") or...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.