code: func (s *Service) createConnection(w http.ResponseWriter, r *http.Request) {
  	opts := store.ConnectionOptions{
  		IdleTimeout: s.ConnIdleTimeout,
  		TxTimeout:   s.ConnTxTimeout,
  	}
  
  	d, b, err := txTimeout(r)
  	if err != nil {
  		w.WriteHeader(http.StatusBadRequest)
  		return
  	}
  	if b {
  		opts.TxTimeout = d
  	}
  
  	d, b, err = idleTimeout(r)
  	if err != nil {
  		w.WriteHeader(http.StatusBadRequest)
  		return
  	}
  	if b {
  		opts.IdleTimeout = d
  	}
  
  	conn, err := s.store.Connect(&opts)
  	if err != nil {
  		http.Error(w, err.Error(), http.StatusServiceUnavailable)
  		return
  	}
  	w.Header().Set("Location", s.FormConnectionURL(r, conn.ID))
  	w.WriteHeader(http.StatusCreated)
  }
docs: // createConnection creates a connection and returns its ID.