Closed dummaso closed 4 months ago
Hi,
It looks like init
should be updated with an extra optional param which is load-opts
which should allow you to specify the behaviour when loading the swagger json. This has existed for a while on cljs-http but it's not exposed by re-frame. I'll make the change and publish a snapshot.
Cheers
Hello,
Have a go with 0.1.27-SNAPSHOT
. There is an extra arg to init
called load-opts
.
It is passed directly into cljs-http as you can see here: https://github.com/oliyh/martian/blob/master/cljs-http/src/martian/cljs_http.cljs#L32 so you can put any cljs-http params you want into it.
Cheers
Seems to work now! Thank you for the quick support and for maintaining this awesome project :)
Have a nice weekend!
Awesome, happy to help!
I'm currently trying to initialize a martian client within a re-frame app using the following code
When initializing using an URL, this results in a CORS-error for the initial request which loads the API-documentation, seemingly ignoring the passed interceptors.
... The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. ...
However, when loading the API-documentation from a local file, the client is initialized without any problems and applies the provided
::cors
middleware to all future requests.Is there any way to also apply the interceptors to the initial request or modify its http-headers in another way? Or am I just missing something? :D
Thanks a lot in advance!