java - HTTP 405 - Method Not Allowed error on a 200 OK response -


i have small rest-ful java back-end clients written in c connect to. there post method call send information, save database , respond 200 ok, if goes well. basic structure shown below.

@post @path("/mypath") @produces("text/html") public response processmessage(final string message, @context final httpservletrequest request) throws ioexception {  ..... return response.ok().build();  } 

my issue on response, following error in log:

javax.ws.rs.notallowedexception: no resource method found , return 405 allow header 

i understand error means in circumstances when let's try execute on endpoint supposed post, example. can't understand though why after response goes out, , shows request type empty.... odd.

some additional info - code on client side has been buggy incorrect http code... have wrong on client side cause kind of response? (i not have access client side code).

also, there no client side code in app, if wondering if there other code making call out of webapp.

thanks ideas!

the issue on client side, without seeing code difficult offer more detailed information -- expectation result of client attempting post or put credentials, or along line.

your recourse enable verbose request logging, log requests generating 405 errors, , report client developers.

worth noting, however, publicly-exposed apis generate piles of 405s , 404s because "hackers" try execute things wordpress hacks , on against known url.


Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -