MockRestServiceServer: how to mock a POST call with a body?

后端 未结 3 1336
北荒
北荒 2021-02-12 22:05

I am trying to mock a POST method with MockRestServiceServer in the following way:

MockRestServiceServer server = bindTo(restTemplate).build();
serv         


        
3条回答
  •  佛祖请我去吃肉
    2021-02-12 22:26

    May use HttpMessageConverter can help. according to the document, HttpMessageConverter::read method can be the place that provide check the input ability.

提交回复
热议问题