I have a RESTful webservice, in which I have written a method which receives `POST` requests.

I am trying to access that method via the URL `http://localhost:8091/prjctname/post`. 

But its throwing the following error:

> 
> *HTTP Status 405 - Request method 'GET' not supported*  
> 
> *type:* Status report  
> 
> *message:* Request method 'GET' not supported  
> 
> *description:* The specified HTTP method is not allowed for the requested resource 
> 
> 
> 

Below is the code snippet.

```java
@RequestMapping(value = "/post", method = RequestMethod.POST)
@Produces("application/json")
@ResponseBody 
public String createUser(@RequestBody PCDBean bean, HttpServletRequest request) {

    String username = null;
    String password = null;
    System.out.println("inside post method");

    String result = service.getCustomer(username, password);
    if(result != null) {
        return username + password;
    } else {
        return "failure";
    }
}

```