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 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 Complete {Vail Pipeline: HTTPEEST = & gt; Future [string] = post ~ ~ Unmarshal [string] val response: future [string] = pipeline (post ("https: // my_internal_serverservices / MainService", payload.stosting ()) response
unmarshal .
Comments
Post a Comment