views:

22

answers:

1

Well basically what the title says, when making an AJAX request with JavaScript. Does the method, i.e. GET / POST, need to be upper case? Thanks in advance.

Edit: Even a yes or no will suffice.

+1  A: 

You can read about it at http://www.w3.org/TR/XMLHttpRequest/#the-open-method

I quote

When the open(method, url, async, user, password) method is invoked, the user agent must run these steps (unless otherwise indicated):
..
3. If method is a case-insensitive match for CONNECT, DELETE, GET, HEAD, OPTIONS, POST, PUT, TRACE, or TRACK subtract 0x20 from each byte in the range 0x61 (ASCII a) to 0x7A (ASCII z).
..

which means it will automatically convert it to upper case on its own ..

So it seems to have some significance (preferring uppercase), and i would suggest you use uppercase just to avoid implementation flaws (improbable).

Gaby
Okay thanks, I will convert to upper case no matter what. Nice to know. Thanks for the link.
Wolfy87