code: func (t TaskService) CreateTask(ctx context.Context, tsk *platform.Task) error {
  	u, err := newURL(t.Addr, tasksPath)
  	if err != nil {
  		return err
  	}
  
  	taskBytes, err := json.Marshal(tsk)
  	if err != nil {
  		return err
  	}
  
  	req, err := http.NewRequest("POST", u.String(), bytes.NewReader(taskBytes))
  	if err != nil {
  		return err
  	}
  
  	req.Header.Set("Content-Type", "application/json")
  	SetToken(t.Token, req)
  
  	hc := newClient(u.Scheme, t.InsecureSkipVerify)
  
  	resp, err := hc.Do(req)
  	if err != nil {
  		return err
  	}
  	defer resp.Body.Close()
  
  	if err := CheckError(resp); err != nil {
  		return err
  	}
  
  	var tr taskResponse
  	if err := json.NewDecoder(resp.Body).Decode(&tr); err != nil {
  		return err
  	}
  	*tsk = tr.Task
  
  	return nil
  }
docs: // CreateTask creates a new task.