Advertisement
Guest User

Untitled

a guest
Jan 28th, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (defn sucessful-post
  2.   ([] {:status 200 :headers {"Content-Type" "application/json"} :body (json/write-str {:status "sucess"})})
  3.   ([username] {:status 200 :headers {"Content-Type" "application/json"} :body (json/write-str {:status "sucess" :message (str username)})}))
  4.  
  5. ;HTTP/1.1 200 OK
  6. ;Date: Tue, 29 Jan 2019 03:37:50 GMT
  7. ;Content-Type: application/json
  8. ;X-XSS-Protection: 1; mode=block
  9. ;X-Frame-Options: SAMEORIGIN
  10. ;X-Content-Type-Options: nosniff
  11. ;Content-Length: 839
  12. ;Server: Jetty(9.2.21.v20170120)
  13.  
  14. ;{"status":"sucess","message":"{:ssl-client-cert nil, :protocol \"HTTP\/1.1\", :cookies {}, :remote-addr \"0:0:0:0:0:0:0:1\", :params {}, :flash nil, :route-params {}, :headers {\"user-agent\" \"curl\/7.54.0\", \"host\" \"localhost:3000\", \"accept\" \"*\/*\", \"content-length\" \"54\", \"content-type\" \"application\/x-www-form-urlencoded\"}, :server-port 3000, :content-length 54, :form-params {}, :compojure\/route [:post \"\/new\"], :session\/key nil, :query-params {}, :content-type \"application\/x-www-form-urlencoded\", :path-info \"\/new\", :character-encoding nil, :context \"\/api\", :uri \"\/api\/new\", :server-name \"localhost\", :query-string nil, :body #object[org.eclipse.jetty.server.HttpInputOverHTTP 0x342a0baa \"HttpInputOverHTTP@342a0baa\"], :multipart-params {}, :scheme :http, :request-method :post, :session {}}"}%
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement