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

xyz.block.ftl.runtime.http.HTTPVerbInvoker Maven / Gradle / Ivy

There is a newer version: 0.368.1
Show newest version
package xyz.block.ftl.runtime.http;

import xyz.block.ftl.runtime.VerbInvoker;
import xyz.block.ftl.v1.CallRequest;
import xyz.block.ftl.v1.CallResponse;

public class HTTPVerbInvoker implements VerbInvoker {

    /**
     * If this is true then the request is base 64 encoded bytes
     */
    final boolean base64Encoded;
    final FTLHttpHandler ftlHttpHandler;

    public HTTPVerbInvoker(boolean base64Encoded, FTLHttpHandler ftlHttpHandler) {
        this.base64Encoded = base64Encoded;
        this.ftlHttpHandler = ftlHttpHandler;
    }

    @Override
    public CallResponse handle(CallRequest in) {
        return ftlHttpHandler.handle(in, base64Encoded);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy