D
D
Doston Elmurodov2018-04-05 14:08:58
ASP.NET
Doston Elmurodov, 2018-04-05 14:08:58

How to send JSON in HTTP request body with URL parameters?

There are two classes:
1st class:

public class SDK {
    public  decimal amount;
    public  string  orderid;
    public  string  callbackUrl; 
}

This class is serialized to a string:
SDK sd = new SDK();
string json = JsonConvert.SerializeObject(sd);

Grade 2:
public class Payer
{
    public string id;
    public string orderId;
    public string FullName;
}

How to pass both json and second class parameters to the URL in the request body using the POST method, multipart/form-data, in C#?
Thank you!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question