scala - How can I return failed response from spray directive? -


I am implementing a simple HTTP routing server for which some fields need to be analyzed in the incoming request and If it is sent to the internal server, then it should answer the caller because it is. I want to log the time spent waiting for an internal server to respond. My instruction looks like this Complete {Vail Pipeline: HTTPEEST = & gt; Future [string] = post ~ ~ Unmarshal [string] val response: future [string] = pipeline (post ("https: // my_internal_serverservices / MainService", payload.stosting ()) response

but it only works Another return code for HTTP 200 replies is never completed for the future.

Can you demonstrate how to apply it properly? Ideally I want to request in the original situation - all with the http headers and etc.

As Rudolph reported that the problem was in the use of unmarshal .

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -