Go REST
M

What is the email format

Misterios Person about 1 year ago 1067 views 6 replies

I am trying with different email formats along with your reference but nothing is working.
Can you please provide me the email format for testing of api.

6 replies
M
Misterios Person about 1 year ago

showing Unprocessable Entity

Z
zeevy about 1 year ago

422 will have detailed error, what format you are sending? And what is the api response body can you please provide

There are curl examples on home page that may help you

M
Misterios Person about 1 year ago

i am generating random string using
// generating random string
var randomstring=Math.random().toString(36).substring(2);

console.log(randomstring)
// concatinating the random string with another string
var emailstring=randomstring+@15ce-body.com

console.log(emailstring)
// assigning those strings to environment variables
pm.environment.set(strmail,emailstring);
pm.environment.set(strname,randomstring);

here is the body

{
name: {{randomstring}},
email: {{emailstring}},
gender: female,
status: inactive
}

response body is

[
{
field: email,
message: is invalid
}
]

M
Misterios Person about 1 year ago

var randomstring=Math.random().toString(36).substring(2);

console.log(randomstring)
var emailstring=randomstring+@15ce-body.com

console.log(emailstring)
pm.environment.set(strmail,emailstring);
pm.environment.set(strname,randomstring);

M
Misterios Person about 1 year ago

it is generating below string
iw5oiogx2y8

and below email
iw5oiogx2y8@15ce-body.com

M
Misterios Person about 1 year ago

sorry that's my mistake

i am assigning environment variable but i am not using that
instead of env variable i am using variables assigned for those strings

thanks for your response

Your reply

Markdown supported