Попытка поставить, метод с двумя параметрами, объект в теле и bool в URL.но нет связи между сервисом и контроллером.контроллер:
[AllowAnonymous]
[HttpPut]
[Route("putQuestionDifficulty/{id}")]
[ResponseType(typeof(Question))]
public IHttpActionResult PutQuestionDifficulty([FromBody] Question question, [FromUri] bool id)
{
var myquestion = db.Questions.Find(question);
if (id)
{
myquestion.Difficulty++;
}
else myquestion.Difficulty--;
db.SaveChanges();
return Ok(question);
}
сервис:
putQuestionDifficulty(question: Question, id: boolean){
return this.http.put<Question>(`${this.baseUrl}/putQuestionDifficulty/${id}`,question);
}