Go REST
M

What is the email format

Misterios Person 12 months ago 1017 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 12 months ago

showing Unprocessable Entity

Z
zeevy 12 months 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 12 months 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 12 months 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 12 months ago

it is generating below string
iw5oiogx2y8

and below email
iw5oiogx2y8@15ce-body.com

M
Misterios Person 12 months 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