Fork me on GitHub
#yada
<
2017-05-30
>
grav06:05:56

I’m thinking of doing a simple nodejs web server that is compatible with bidi routes. It’ll just be a wrapper around expressjs. Anything like that currently existing?

danielcompton07:05:57

uses bidi as the default

grav13:05:48

Oh, nice

maleghast13:05:12

@malcolmsparks - I have finally found the time to look at the stuff you sent / posted yesterday. Thanks again, but I am afraid I need to ask you for a little more help... I am getting this when I POST:

415: Unsupported Media Type

The request entity has a media type which the server or resource does not support.

clojure.lang.ExceptionInfo: Unsupported Media Type {:status 415, :message "Method does not declare that it consumes this content-type", :consumes #{"application/octet-stream"}, :content-type <#C0702A7SB|yada>.media_type.MediaTypeMap{:name "multipart/form-data", :type "multipart", :subtype "form-data", :parameters {"boundary" "----WebKitFormBoundarygYuTt1DtxxTptU3p"}, :quality 1.0}}
	at clojure.core$ex_info.invokeStatic(core.clj:4725)
	at clojure.core$ex_info.invoke(core.clj:4725)
	at yada.interceptors$process_request_body.invokeStatic(interceptors.clj:168)
	at yada.interceptors$process_request_body.invoke(interceptors.clj:144)
	at manifold.deferred$eval7903$chain___7924.invoke(deferred.clj:863)
	at manifold.deferred$eval7903$chain___7924.doInvoke(deferred.clj:884)
	at clojure.lang.RestFn.applyTo(RestFn.java:151)
	at clojure.core$apply.invokeStatic(core.clj:661)
	at clojure.core$apply.invoke(core.clj:652)
	at manifold.deferred$eval7903$chain___7924$fn__7928.invoke(deferred.clj:889)
	at manifold.deferred.Listener.onSuccess(deferred.clj:219)
	at manifold.deferred.Deferred$fn__7702.invoke(deferred.clj:378)
	at clojure.lang.AFn.run(AFn.java:22)
	at io.aleph.dirigiste.Executor$Worker$1.run(Executor.java:62)
	at manifold.executor$thread_factory$reify__7105$f__7106.invoke(executor.clj:44)
	at clojure.lang.AFn.run(AFn.java:22)
	at java.lang.Thread.run(Thread.java:745)

maleghast13:05:52

and I am assuming I am doing something silly, and that you might be able to help me out..?

maleghast13:05:51

I have the

enctype="multipart/form-data"
in my HTML form definition, and I have used the example you posted, but clearly adapted it to my codebase...

borkdude19:05:02

@maleghast Maybe you need to add “multipart/form-data” to your :consumes set?

maleghast20:05:42

Yeah, I think that might be it...

maleghast20:05:05

I'll try it when I get back to my AirBnB; thx

maleghast21:05:40

@borkdude - I am going to try in the morning; knackered...