How can one test a grails controller method which expects header "Content-Type" to be "image/jpeg" and a body with binary image data?
It seems GrailsMockHttpServletRequest is only usable for requests with binary data, if one uses multipart request, as the method addFile executes setContentType("multipart/form-data")and besides that there are only methods for handling json and xml bodys.
Aucun commentaire:
Enregistrer un commentaire