You may faced with by making call POST ,PUT,DELETE operations .
GET request won't be problem.
Solution:
Content-Type: application/json
If you have java REST client or another clients tool like POSTMAN,
You should add this parameter in headers
I had Request param like below .
@WebService
@Path("/tasks")
@Consumes({ "application/json", "application/xml" })
@Produces({ "application/json", "application/xml" })
public interface TaskWs {
@PUT
@Path("/update/deneme/{id}")
public Response updateTask(@PathParam("id") Long id,TaskDto taskDto);
.
.
}
but implementation side I had
public Response updateTask(@PathParam("id") Long id,TaskDto taskDto) {
return null;
}
I deleted @PathParam("id")
so
I had now this code .
public Response updateTask(Long id,TaskDto taskDto) {
return null;
}
Hiç yorum yok:
Yorum Gönder