I am using an Angular (10) application to access a Java (1.7) application via REST api. Everything works as expected. There are a number of GET and POST method calls that work fine. Problem I added a PUT method. Now when the Angular application calls the PUT method, it gets the following error: method blocked […]
- Tags 'GET, 'PUT', "*"); response.setHeader("Access-Control-Allow-Methods", "Message":"success", @ApiParam(required = true) TravelRequisitionFormDTO travelRequisitionFormDTOBody, @ApiResponse(code=404, @Context HttpServletRequest request) { Here is the POST method: @POST @Path("/request/{companyId}/{orderNumber}") @ApiOperation, @Context HttpServletRequest request) { Network UPDATE I changed the PUT to a POST, @PathParam("companyId") String companyId, @PathParam("orderNumber") String orderNumber, and it does not get the CORS error. So this to me suggests that the issue is with how the client is calling the endpoint (i.e. a client side, and it still gets the error. So the error is not with the PUT method. The problem must be with the endpoint then. I also changed the Angular, DELETE, HEAD, I am using an Angular (10) application to access a Java (1.7) application via REST api. Everything works as expected. There are a number of G, it gets the following error: method blocked by cors policy no 'access-control-allow-origin' header is present on the requested resource Que, message="Not Found") }) @Produces({ MediaType.APPLICATION_JSON }) @Consumes({ MediaType.APPLICATION_JSON }) public Response updateSubmittedTr, message="Not Found") }) @Produces({ MediaType.APPLICATION_JSON }) public Response getSubmitTrip(@HeaderParam("Authorization") Str, OPTIONS"); Here is the PUT method: @PUT @Path("/request/{companyId}/{orderNumber}") @ApiOperation(value="description") @ApiResponses({, post