Skip to content

jcpsantiago/protopretzel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Travis build status Coverage status lifecycle License: MIT

protopretzel

Protocol Buffers filter and serializer for Plumber.

The ProtoBuf filter will unserialize ProtoBuf messages according to the messagetype set in the request header (e.g. Content-Type: application/x-protobuf; messagetype=prototest.TestPayload), and matching a .proto descriptor file.

The ProtoBuf serializer serializes an RProtoBuf message descriptor object, adding the type of message to the response header.

protopretzel is under active development and things may break. Check out the protopretzel-playground for an example implementation.

Installation

You can install the current development version of protopretzel with:

# install.packages("devtools")
devtools::install_github("ozean12/protopretzel")

Example

library(plumber)
library(protopretzel)

# Needs to be added before API creation
addProtobufSerializer()

api <- plumber$new("api.R")

addProtobufFilter(api, descriptor_path = "prototest.proto")

api$run(host = "0.0.0.0", port = 8000)

About

🥨0100110🥨 Protocol Buffers for Plumber APIs

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages