I currently have an endpoint in my project:
[HttpPost("process")]
public IActionResult Process (string Val1, [FromBody] object Json)
{
     //processing.....
     Return Ok(...);  
}
And on my client side I am trying to call this endpoint with WebClient like so:
string response = null;
string body = "{}";
using (var client = new WebClient())
{
     client.UserDefaultCredentials = true;
     client.Headers.Add(HttpRequestHeader.ContentType, "application/json; charset=utf-8");
     response = client.UploadString("localhost:55555/api/process?Val1=Param", body);
}
Here's where my concerns are:
- For this endpoint, I will typically be passing a JSON object 
- However, I want this endpoint to also NOT require a body, I would want it to be empty, as the endpoint should not require it 
- If you look at my - bodyvariable - I am setting it to "{}" otherwise I've not found a different way to pass "EMPTY" body to the endpoint
Questions:
- How do I properly pass an EMPTY body to this endpoint? (this endpoint will be used by different clients, and I am just looking for best practice approach to this? 
- In my endpoint, I have - [FromBody] object Jsonparameter. Is it a better practice to have it be as- objector can I alternatively do- JObjectthat could still accept an Empty body
Forgive my "noobness" with these questions if they seem obvious, I'm just getting started in the API development and want to make sure I am using best practices.
 
    