DEV Community

Discussion on: Introduction to ASP.NET Core Integration Testing

sakinala1 profile image

iam using webapplicationfactory

calling methods as
var response = await _client.GetStringAsync("api/controller/method");

here how to pass that method..hope you understand

Thread Thread
kaos profile image
Kai Oswald Author

You can just use string interpolation.

var url = $"api/controller/method/{id}?param1={param1}&param2={param2}";
var response = await _client.GetStringAsync(url);