I am new to compojure api.
How can I show body response in JSON format?
Here is the code what I have written
core.clj
(ns clojure-dauble-business-api.core
(:require [compojure.api.sweet :refer :all])
(:require [ring.util.http-response :refer…
I am getting a ring stream response which I do not know how to deal with.
I passed in a parameters to my ajax POST and when it gets to the function in my compojure route, instead of being the original parameter I passed in, I get a ring stream…
I have defined the following schema:
(s/defschema Card
{:cardNumber s/Str
:cvv s/Str
:creditCardMonthValidity s/Str
:creditCardYearValidity s/Str
:cpf s/Str
:name s/Str
:phoneNumber s/Str})
and then in a route I'm using the same keys…
I am currently using the Luminus template with the +swagger option, which adds compojure-api support.
My current setup is like so (only relevant bits):
(ns my-project.routes.services
(:require [compojure.api.sweet :refer :all]
…
I have started learning Luminus framework to get into Clojure(script) for web applications. For RESTful services framework suggests using swagger/compojure-api. Examples were helpful, but I can't find any for returning collections.
Here is my…
I just created my RESTful service through Luminus using this doc: http://www.luminusweb.net/docs/services.md
Apparently Compojure-API uses Schema library to map the query parameters. However, I would like to be able to get all the query parameters…
I use luminus template with ring/compojure/swagger setup.
When I feed the REST API i created malformed JSON i get 500 and:
java.lang.IllegalArgumentException: No value supplied for key: {:formats (:json-kw :yaml-kw :edn :transit-json…
I have been using compojure-api to build a server and I have an endpoint that returns json to the client. Now the problem: it seems to me that it is taking too much time to build the response to send back to the client.
Here is my log. It shows that…
I'm following this tutorial on how to use the compojure api and have run into a dead end with this exception:
lein ring server
2022-08-09 23:19:55.538:INFO::main: Logging initialized @921ms
WARN clojure.tools.logging not found on classpath,…
I have a server hosting my API. My API relies on data requested from a third-party API (Spotify). Here are the relevant parts of my API handler:
(ns myapp.api.handler
(:require
[compojure.api.sweet :refer :all]
[ring.util.http-response…
I am trying to set my simple server to allow CORS. I am making a request localhost from a clojurescript application that I am making.
I have given a search, for example this answer: How do I add CORS to a compojure-api app?. But from what I can see,…
I am new to clojure and I am trying to make a simple API with 3 endpoints.
I am trying to implement an endpoint which will take each row of a query and put it to a json.
So I have an SQLite database. These are my entries for example:
{:timestamp…
We use the compojure-api to get us some nice swagger integration in our ring apps. The :swagger {:deprecated true} meta works like a champ to get the swagger page correct, but I have a requirement that I put a specific header on the response when…
Cloverage is now failing after I adding role based authentication to my compojure api. Whilst running lein cloverage I get this exception:
Exception in thread "main" java.lang.IllegalArgumentException: No method in multimethod 'restructure-param'…