func (c *Client) DeleteJob(jobID string, purge bool) error {
	params := url.Values{}
	params.Set("purge", strconv.FormatBool(purge))
	return c.doHTTPReq(http.MethodDelete,
		fmt.Sprintf(uriDeleteJob, jobID), params, nil, nil)
}
DeleteJob sends a request to delete a job.
package client
import (
	"bytes"
	"encoding/json"
	"fmt"
	"io"
	"io/ioutil"
	"log"
	"net/http"
	"net/url"
	"strconv"
	"github.com/RichardKnop/machinery/v1/tasks"
	"github.com/knadh/sql-jobber/models"
)
const (
	uriPostJob = "/tasks/%s/jobs"
	uriCancelJob = "/jobs/%s"
	uriDeleteJob = "/jobs/%s"
	uriDeleteGroupJob = "/groups/%s"
	uriGetJobStatus = "/jobs/%s"
	uriGetPendingJobs = "/jobs/queue/%s"
	uriPostJobGroup = "/groups"
	uriGetGroupStatus = "/groups/%s"
)
type httpResp struct {
	Body     []byte
	Response *http.Response
}
type Opt struct {
	RootURL    string
	HTTPClient *http.Client
	Logger     *log.Logger
}
type Client struct {
	o *Opt
}
func New(o *Opt) *Client {
	return &Client{
		o: o,
	}
}
func (c *Client) PostJob(j models.JobReq) (models.JobResp, error) {
	var out models.JobResp
	err := c.doHTTPReq(http.MethodPost,
		fmt.Sprintf(uriPostJob, j.TaskName), j, nil, &out)
	return out, err
}
func (c *Client) GetJobStatus(jobID string) (models.JobStatusResp, error) {
	var out models.JobStatusResp
	err := c.doHTTPReq(http.MethodGet,
		fmt.Sprintf(uriGetJobStatus, jobID), nil, nil, &out)
	return out, err
}