Please guys what is the problem I frequently get a null value post from my php wamp to asp.net core webapi server
[Route("api/[controller]")]
public class AfritalkController : Controller
{
//Declaring the variables of the controller
private IUSSDService ussdService { get; set; }
public AfritalkController(IUSSDService ussdService)
{
this.ussdService = ussdService;
}
// POST: api/Default
[HttpPost("post1")]
public async Task<int> Post([FromBody]string value)
{
int result = await this.ussdService.AddUssdrequest(value);
return result;
}
[HttpPost("postsession")]
//[ActionName("postsession")]
public async Task<int> Post(Sessionview model)
{
int result = await this.ussdService.Addsession(model.SessionID, model.Phone, model.Level);
return result;
}
// PUT: api/Default/5
[HttpPut("{id}")]
public async Task<int> Put(string id, [FromBody]string value)
{
string sessionid = id; string level = value;
int result = await this.ussdService.Updatesession(sessionid, level);
return result;
}
}