0

I am writing an API to trigger a batch operation and I am confused which HTTP verb to use.I cannot use

GET --> As i am not fetching any info PUT/POST --> I have no content because I am not creating or updating any resource

I can go with either POST/PUT with content length zero , is it a good approach or is there anything better ?

Arjun Menon
  • 445
  • 7
  • 21
  • You mean: Just hitting server to do something, right? – Tân Nov 27 '19 at 13:23
  • Yes. I don't need to pass anything in request. The API will get some data internally and will trigger the batch – Arjun Menon Nov 27 '19 at 13:27
  • 1
    Possible duplicate of [What is the difference between POST and GET?](https://stackoverflow.com/questions/3477333/what-is-the-difference-between-post-and-get) – Tân Nov 27 '19 at 13:33

0 Answers0