Fork me on GitHub
#xtdb
<
2020-09-08
>
hairfire14:09:30

I'm trying the Crux/HTTP interface for the first time. The included "dashboard" works as I expect, but testing with curl is returning an exception map as a string. Here's the curl bash command: curl -X GET -H "Content-Type: application/edn" http://localhost:9010/entity/:dbpedia.resource/Pablo-Picasso here's the response: {:via [{:type java.lang.RuntimeException, :message "EOF while reading", :at [clojure.lang.Util runtimeException "Util.java" 221]}], :trace [[clojure.lang.Util runtimeException "Util.java" 221] [clojure.lang.EdnReader read "EdnReader.java" 130] [clojure.lang.EdnReader read "EdnReader.java" 111] [clojure.lang.EdnReader readString "EdnReader.java" 67] [clojure.edn$read_string invokeStatic "edn.clj" 46] [clojure.edn$read_string invoke "edn.clj" 37] [crux.codec$read_edn_string_with_readers invokeStatic "codec.clj" 518] [crux.codec$read_edn_string_with_readers invoke "codec.clj" 517] [crux.http_server$body__GT_edn invokeStatic "http_server.clj" 46] [crux.http_server$body__GT_edn invoke "http_server.clj" 43] [crux.http_server$entity invokeStatic "http_server.clj" 137] [crux.http_server$entity invoke "http_server.clj" 136] [crux.http_server$handler invokeStatic "http_server.clj" 288] [crux.http_server$handler invoke "http_server.clj" 282] [crux.http_server$fn__16765$fn__16769 invoke "http_server.clj" 410] [clojure.core$some_fn$sp3__8668 invoke "core.clj" 7461] [ring.middleware.params$wrap_params$fn__16554 invoke "params.clj" 67] [ring.middleware.resource$wrap_resource_prefer_resources$fn__16590 invoke "resource.clj" 25] [crux.http_server$wrap_exception_handling$fn__16619 invoke "http_server.clj" 79] [ring.adapter.jetty$proxy_handler$fn__16344 invoke "jetty.clj" 27] [ring.adapter.jetty.proxy$org.eclipse.jetty.server.handler.AbstractHandler$ff19274a handle nil -1] [org.eclipse.jetty.server.handler.HandlerWrapper handle "HandlerWrapper.java" 127] [org.eclipse.jetty.server.Server handle "Server.java" 500] [org.eclipse.jetty.server.HttpChannel lambda$handle$1 "HttpChannel.java" 386] [org.eclipse.jetty.server.HttpChannel dispatch "HttpChannel.java" 562] [org.eclipse.jetty.server.HttpChannel handle "HttpChannel.java" 378] [org.eclipse.jetty.server.HttpConnection onFillable "HttpConnection.java" 270] [http://org.eclipse.jetty.io.AbstractConnection$ReadCallback succeeded "AbstractConnection.java" 311] [http://org.eclipse.jetty.io.FillInterest fillable "FillInterest.java" 103] [http://org.eclipse.jetty.io.ChannelEndPoint$2 run "ChannelEndPoint.java" 117] [org.eclipse.jetty.util.thread.strategy.EatWhatYouKill runTask "EatWhatYouKill.java" 336] [org.eclipse.jetty.util.thread.strategy.EatWhatYouKill doProduce "EatWhatYouKill.java" 313] [org.eclipse.jetty.util.thread.strategy.EatWhatYouKill tryProduce "EatWhatYouKill.java" 171] [org.eclipse.jetty.util.thread.strategy.EatWhatYouKill run "EatWhatYouKill.java" 129] [org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread run "ReservedThreadExecutor.java" 388] [org.eclipse.jetty.util.thread.QueuedThreadPool runJob "QueuedThreadPool.java" 806] [org.eclipse.jetty.util.thread.QueuedThreadPool$Runner run "QueuedThreadPool.java" 938] [java.lang.Thread run "Thread.java" 834]], :cause "EOF while reading"}

hairfire14:09:57

Here's a screenshot of the "dashboard":

jarohen15:09:48

I wonder if that's to do with the / in the entity-id - does it work if the / is URL-encoded?

jarohen15:09:07

%3F, possibly...? :thinking_face:

jarohen15:09:34

aww, %2F, close 🙂

hairfire17:09:54

I just worked with Jeremy, and now understand that the docs are for an older version of crux-http. I have it working now.

👌 3