Questions tagged [clojure-ring]

5 questions
5
votes
2 answers

Ring wrap-json-body is not converting json data to keyword map, but to a string map

I have come back to clojure after moderately dabbling with it about 10+ years ago, and so I might be doing something silly here. I am trying to write a simple API with compojure and ring server, and right now I've isolated my problem to just a few…
LocustHorde
  • 6,361
  • 16
  • 65
  • 94
2
votes
0 answers

Browser says access-control-allow-origin header not present in clojure ring

I make a request to a server through the client browser like so https://example.com/bar, but get the error: Access to XMLHttpRequest at 'https://example.com/bar/' from origin 'https://www.example.com' has been blocked by CORS policy: No…
zengod
  • 1,114
  • 13
  • 26
1
vote
1 answer

Unable to set cookie in clojure ring

I'm sending the following response in clojure ring: (res/set-cookie (res/redirect (env :some-url)) "some-id" (-> req foo-ns/bar :id ) {:max-age (* 30 24 60 60 1000) :path…
FooBar
  • 71
  • 1
0
votes
2 answers

How to use node.js libraries and APIs with clojure ring?

Suppose there's an API that I want to use that's available in Node.js, but not for clojure ring. Is there a way I can use it in in clojure ring?
zengod
  • 1,114
  • 13
  • 26
0
votes
1 answer

Getting POSTed data in a Clojure / Ring / HttpKit application

I'm writing a simple HttpKit / Ring application and am trying to post some data from a form to it. Here's the relevant part of my server code : (defn save-page [request] (let [qs (:query-string request) fp (:form-params request)] …
interstar
  • 26,048
  • 36
  • 112
  • 180