Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to pass input json with byte[] in web api postman

{
"From":"[email protected]",  "To":["[email protected]"],
"Cc":["[email protected]"],  "Bcc":["[email protected]"],
"Subject":"Export",  "TemplateName":"Agent",
"EmailType":"Agent",  "Attachments":[{
"Name":"wifi.txt",    "Type":"txt",
"StreamData":{"NzI5OTk4NzgxNg0KDQoxIG0tNjczDQoNCjJtLTExMjINCjRtLTE1NzENCjgtMjE4Mw0KDQoxMDYxDQoNCjUwMCBtb2RlbSByZWZ1bmRhYmxl"}}]`    ``
}`input json``

I'm calling one method by passing this value as input json using postman, but the StreamDate value alone coming as null.

Can someone please help me on this?

like image 987
user3815683 Avatar asked Mar 11 '26 16:03

user3815683


1 Answers

Well it's an invalid JSON object. StreamData has to be either a string or an object with a key. Try

{
"From":"[email protected]",  
"To":["[email protected]"],
"Cc":["[email protected]"],  
"Bcc":["[email protected]"],
"Subject":"Export",  
"TemplateName":"Agent",
"EmailType":"Agent",  
"Attachments":[{
    "Name":"wifi.txt",
    "Type":"txt",
    "StreamData": "NzI5OTk4NzgxNg0KDQoxIG0tNjczDQoNCjJtLTExMjINCjRtLTE1NzENCjgtMjE4Mw0KDQoxMDYxDQoNCjUwMCBtb2RlbSByZWZ1bmRhYmxl"
}]

}

like image 167
Swaraj Giri Avatar answered Mar 13 '26 23:03

Swaraj Giri



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!