0

How to use HttpGet to perform Update operation in WebApi?

Thanks

1
  • Please show us the code you have written so far, and explain how it doesn't work. We aren't going to write your code for you. Commented Apr 23, 2016 at 17:29

1 Answer 1

1

CRUD

Create - POST Read - GET Update - PUT Delete - DELETE

For update you want to use httpput. On controller side you want the method to start with Put.

Sign up to request clarification or add additional context in comments.

4 Comments

Thanks. Does this mean that with GET methd I can't do any update or insert operation?
Technically you can but it is considered bad practice. HTTP GET calls should be idempotent and typically read only. In the case of a failed call httpget could be called multiple times and result in undesirable behavior.
@MukilDeepthi According to REST design principles you should use "GET" method for retrieving the data. I would recommend follow goods design practices.
Correct GET should only be used for data retrieval.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.