Rapidoid request content type matching

19 views Asked by At

I want to have a controller method matching content type like below:

@Controller
public class MyCtrl {

    @POST("/mp3")
    @ContentType("audio/mpeg")
    public String post() {
        // match and do stuff only if the content type of /mp3 POST is audio/mpeg
    }
}

Yet I cannot find in the documentation or on the Internet right way to do this. Nor can I find ContentType/MediaType annotation in Rapidoid. I can process request content type manually. However, I would like to avoid doing this if there is a way to do content type matching via annotations or similar declarative way.

0

There are 0 answers