Skip to content

Latest commit

 

History

History

aech

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

aech (http client) example

Example GET request to httpbin:

$ clj -M:aech GET https://httpbin.org/get -q msg:echo -h accept:application/json

Example POST request to httpbin:

$ clj -M:aech POST https://httpbin.org/post '{:data [{:edn "is better"} {:edn "agrees"}]}'

Note: the body is the first argument is an edn data structure, which is converted to json to be sent to httpbin

GraalVM Compilation

Requires you have the native-image binary on your machine.

$ clj -e "(compile 'aech.core)" \
&& clj -M:uberjar --main-class aech.core \
&& mkdir -p target/bin/ \
&& native-image -jar target/aech.jar --enable-http --enable-https --no-fallback -o target/bin/aech