简体   繁体   中英

In Java, how to write HTML code in a POST request's body?

In a SpringBoot project, I have a POST route that receives HTML code and sends out an email with the HTML code as content.

I tried to use Postman to test it, and pasted the HTML code into the Body Json's payload field, as shown below:

在此处输入图像描述

But the format is messed up. It seems that I need to escape the quotes or something.

I am wondering how to do it conveniently?

Thanks!

As @Yann39 indicated, I need to use an online JSON encoder

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM