public async Task RegisterAsync(string email, string username, DateTime dateOfBirth, string password, string reconformPassword) { var client = new HttpClient(); var model = new UserAccount { Password = password, Email = email, Username = username, DateOfBirth = dateOfBirth, }; var json = new JsonConvert.SerializeObject(model); HttpContent content = new StringContent(); }
// hide indexResponse.ApiCall.RequestBodyInBytes.Utf8String().Should().Be(JsonConvert.SerializeObject(expected));
public static (T fake, StringContent json) WithJsonContent <T>(this T request) => (request, new StringContent(JsonConvert.SerializeObject(request), Encoding.UTF8, "application/json"));
new StringContent(JsonConvert.SerializeObject(data), Encoding.UTF8, "application/json")
var content = new StringContent(JsonConvert.SerializeObject(transactionRequest));