How does post data work with Common Lisp?

I have a post route:

(defroute admin-post ("/admin" :method :post)
    (&post client db email)
  (let ((c (write-to-string client))
        (d (write-to-string db))
        (res (by-email email)))
    (render-template* *admin.html* nil
      :title "Admin Area"
      :clientName c
      :dbName d
      :db-res res)))

The value of email is processed by the by-email function successfully. But the c and d values are nil.

ive also tried without write-to-string but it returns a blank value to the page.

UPDATE

Here is my html. The form names are the same as the defroute params:

<form id="form" action="/admin" method="post">
  
  <input type="text" name="client"  placeholder="Enter Client Name"/>

  <input type="text" name="db" placeholder="Enter DB name"/>

  <input type="submit" value="Send"/>
</form>



Comments

Popular posts from this blog

Today Walkin 14th-Sept

Hibernate Search - Elasticsearch with JSON manipulation

Spring Elasticsearch Operations