Closed rgkirch closed 2 years ago
I'm trying to use martian but any call I make with response-for gives me nil. I've tried in clojure and clojurescript.
response-for
nil
src/my/ns.cljc
(ns my.ns (:require #?(:cljs [cljs.core.async :as async :refer [<! >!] :refer-macros [go]] :clj [clojure.core.async :as async :refer [<! <!! >! >!! go]]) [martian.core :as martian] #?(:clj [martian.clj-http :as martian-http] :cljs [martian.cljs-http :as martian-http]))) (def m (martian/bootstrap "http://icanhazip.com" [{:route-name :ip :path-parts [] :method :get}])) (martian/response-for m :ip) ;; nil (martian/url-for m :ip) ;; "http://icanhazip.com" (martian/request-for m :ip) ;; {:method :get, :url "http://icanhazip.com"}
project.clj
(defproject martian-broke "0.0.1" :dependencies [[org.clojure/clojure "1.11.0-alpha2"] [org.clojure/core.async "1.3.618"] [com.github.oliyh/martian "0.1.20"] [com.github.oliyh/martian-clj-http "0.1.20"] [com.github.oliyh/martian-vcr "0.1.20"]] :source-paths ["src"] :test-paths ["test"])
Hi,
You need to use martian-http/bootstrap to get the interceptors that perform the request.
martian-http/bootstrap
Hope this helps Cheers
Thanks!
I'm trying to use martian but any call I make with
response-for
gives menil
. I've tried in clojure and clojurescript.src/my/ns.cljc
project.clj