What is HTTP Method?
The verb (GET, POST, PUT, DELETE, etc.) that defines the type of action an HTTP request performs.
Definition
An HTTP method (or verb) specifies the desired action to perform on a resource. GET retrieves data, POST submits data for processing, PUT replaces a resource, PATCH partially updates it, and DELETE removes it. In CronJobPro, you choose the HTTP method for each job based on what your endpoint expects. Most cron jobs use GET (for triggers with no data) or POST (for triggers with a request body).
Simple Analogy
Like different types of postal services: GET is like reading your mail, POST is like sending a package, PUT is like replacing a package, and DELETE is like canceling a subscription.
Why It Matters
Using the wrong HTTP method can cause your cron job to fail or behave unexpectedly. If your endpoint expects POST but CronJobPro sends GET, you will get a 405 Method Not Allowed error. Understanding HTTP methods helps you configure your cron job correctly and design endpoints that follow REST conventions.
How to Verify
Check your endpoint's documentation or code to determine which HTTP method it expects. Test with curl using different methods: `curl -X GET`, `curl -X POST`. In CronJobPro, the HTTP method is configured per job and shown in the job detail view.
Common Mistakes
Using GET for operations that modify data (GET should be safe and idempotent). Using POST when GET would suffice, unnecessarily complicating the request. Not handling the OPTIONS method for CORS preflight requests if the endpoint is browser-accessible.
Best Practices
Use GET for read-only trigger endpoints and POST for endpoints that need request body data. Follow REST conventions: GET for retrieval, POST for creation, PUT for replacement, DELETE for removal. Document which method each endpoint accepts.
HTTP Methods Guide
Learn about HTTP methods
Try it free →Frequently Asked Questions
What is HTTP Method?
An HTTP method (or verb) specifies the desired action to perform on a resource. GET retrieves data, POST submits data for processing, PUT replaces a resource, PATCH partially updates it, and DELETE removes it. In CronJobPro, you choose the HTTP method for each job based on what your endpoint expects. Most cron jobs use GET (for triggers with no data) or POST (for triggers with a request body).
Why does HTTP Method matter for cron jobs?
Using the wrong HTTP method can cause your cron job to fail or behave unexpectedly. If your endpoint expects POST but CronJobPro sends GET, you will get a 405 Method Not Allowed error. Understanding HTTP methods helps you configure your cron job correctly and design endpoints that follow REST conventions.
What are best practices for HTTP Method?
Use GET for read-only trigger endpoints and POST for endpoints that need request body data. Follow REST conventions: GET for retrieval, POST for creation, PUT for replacement, DELETE for removal. Document which method each endpoint accepts.
Related Terms
Endpoint
A specific URL where an API or service receives and processes HTTP requests.
Request Body
The data payload sent with POST or PUT requests to provide input to the endpoint.
HTTP Status Code
A three-digit number returned by a server indicating the result of an HTTP request.
Content-Type
An HTTP header that specifies the format of the request or response body (e.g., JSON, XML, form data).