1
Answer

Pass body in RestClient

Geni Lou

Geni Lou

3y
549
1

How can I pass a request body in RestClient like the parameter below 

var b = @"{" + "\n" +
@"  ""clientId"": 11," + "\n" +
@"  ""clientPassword"": ""password""," + "\n" +
@"  ""type"": [" + "\n" +
@"    ""sale""," + "\n" +
@"    ""purchase""" + "\n" +
@"  ]" + "\n" +
@"}";

using the model

    public class Credential

    {

        public string ClientId { get; set; }

        public string ClientPassword { get; set; }

        public List<string> Type { get; set; }

    }

 

Answers (1)