This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub struct ChannelTransport { | |
rx: UnboundedReceiver<Vec<u8>>, | |
tx: UnboundedSender<Vec<u8>>, | |
} | |
type TransportImpl = Transport<ChannelTransport, Vec<u8>, Vec<u8>, Bincode<Vec<u8>, Vec<u8>>>; | |
impl ChannelTransport { | |
pub fn new() -> ( | |
TransportImpl, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @param parameter - this is string that contains parameters for Http POST | |
* @param request - old Request | |
* @return - new {@link Request} with additional parameters | |
* */ | |
public static Request interceptRequest(@NotNull Request request, @NotNull String parameter) | |
throws IOException { | |
ByteArrayOutputStream baos = new ByteArrayOutputStream(); |