All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.mstream.trader.commons.ratpack.exception.RequestHandlerUtil Maven / Gradle / Ivy

The newest version!
package io.mstream.trader.commons.ratpack.exception;


import io.mstream.trader.commons.http.RequestContext;
import ratpack.handling.Context;
import rx.Observable;

import static ratpack.rx.RxRatpack.observe;


public class RequestHandlerUtil {
    
    public static Observable observeRequest(Context ctx) {
        
        return observe(
                ctx
                        .getRequest()
                        .getBody()
        )
                .map(body ->
                        new RequestContext(
                                ctx,
                                body
                        )
                );
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy