0

I am using parameters in post method, for example:

https://localhost:44345/exemple?id=123&value=123&anotherValue=123

But, I'd like to do not show the parameters in the header, how can I send these in the body as a json, example:

{
    "id": "123",
    "value": "123",
    "anotherValue": "123"
}

Let me know if someone already asked this, thanks.

Zahra Bayat
  • 355
  • 3
  • 15

1 Answers1

0

You can use the AddJsonBody method. There is an example in the official RestSharp documentation: https://restsharp.dev/usage/parameters.html#addjsonbody

A general suggestion when using a (third party) library is to go through documentation.