空间被新线所取代( )以双引号的字符串作为请求主体在REST API中传递

问题描述 投票:0回答:0
我有必要实施正则表达式,该表达式在电子邮件地址中接受双引号中接受空间。例如,“与空间的不寻常电子邮件”@domain.com。请注意,电子邮件是双重报价的,并且是有效的电子邮件。 我正在用Postman测试我的API,以下是我的要求机构:

{"data": { "id": "#customerId", "type": "customer s", "attributes": { "contactInformation" : { "emailAddresses" : [ { "emailAddress" : "\"unusual email with space\"@domain.com" } ] } } } }

请求通过并进入我的API控制器,但空间被新行替换( )
"\"unusual email with\nspace\"@domain.com"
我的请求标题包含:

type:application/json accept-charset:utf-8


有人可以帮助如何在空间上获得完全相同的字符串?

MahendraRathod

如果您用\ u0020或%20替换空间应该没关系..!

spring spring-boot spring-mvc postman
最新问题
© www.soinside.com 2019 - 2025. All rights reserved.