xmlHttp.open('post', './UserServer', true);
xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp.send("type=1&userId=" + userId);
//Send() method will also report 405 if the wrong parameter is passed, such as missing '=' or '&' or setRequestHeader("Content-type", "application/x-www-form-urlencoded")
Read More:
- [Solved] “status“:405,“error“ Request method ‘POST‘ not supported“
- Abstract method and static method of java interface
- [Solved] eureka Startup Error: Unable to start web … nested exception is org.springframework.boot.web.server.WebS
- [Solved] eureka Startup Error: Unable to start web … nested exception is org.springframework.boot.web.server.WebS
- [Solved] JAVA Web Error: startup failed due to previous errors
- JAVA: How to Read JSON Format Data (Web Game Development)
- JAVA Error Illegal access: this web application instance has been stopped already. Could not load net.sf
- [Solved] Maven Project Error: java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- JAVA: How to use the third-party font library method (using the third-party TTF / TTC font library method)
- Asynchronous processing of HTTP request by Java_ Method 1: through callable
- [Solved] Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerExcepti
- [Solved] Mvel2 Error: java.lang.VerifyError method: getKnownEgressType signature
- [Solved] Invocation of init method failed; nested exception is java.lang.NoSuchMethodError:
- [Solved] SSM startup error: ClassNotFoundException: java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- [Solved] error: method does not override or implement a method from a supertype
- Using Post no Body Error: socket hang up [How to Solve]
- [Solved] Method threw ‘java.lang.StackOverflowError‘ exception. Cannot evaluate
- [Solved] IDEA java Cannot resolve method ‘getName‘ in ***
- Asynchronous processing of HTTP request by Java_ Method 2: through deferredresult
- Spring MVC uses Ajax to submit requests asynchronously to complete login