Geni Lou

Geni Lou

  • NA
  • 101
  • 24.5k

Pass body in RestClient

Nov 6 2021 2:40 AM

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)