Module: HTTPX::Plugins::GRPC
- Defined in:
- lib/httpx/plugins/grpc.rb,
lib/httpx/plugins/grpc/call.rb,
lib/httpx/plugins/grpc/message.rb
Overview
Defined Under Namespace
Modules: InstanceMethods, Message, OptionsMethods, RequestBodyMethods, ResponseMethods, StringExtensions
Classes: Call
Constant Summary
collapse
- DEADLINE =
60
- MARSHAL_METHOD =
:encode
- UNMARSHAL_METHOD =
:decode
{
"content-type" => "application/grpc",
"te" => "trailers",
"accept" => "application/grpc",
}.freeze
Class Method Summary
collapse
Class Method Details
57
58
59
60
|
# File 'lib/httpx/plugins/grpc.rb', line 57
def configure(klass)
klass.plugin(:persistent)
klass.plugin(:stream)
end
|
62
63
64
65
66
67
68
69
|
# File 'lib/httpx/plugins/grpc.rb', line 62
def (options)
options.merge(
fallback_protocol: "h2",
grpc_rpcs: {}.freeze,
grpc_compression: false,
grpc_deadline: DEADLINE
)
end
|
.load_dependencies ⇒ Object
50
51
52
53
54
55
|
# File 'lib/httpx/plugins/grpc.rb', line 50
def load_dependencies(*)
require "stringio"
require "httpx/plugins/grpc/grpc_encoding"
require "httpx/plugins/grpc/message"
require "httpx/plugins/grpc/call"
end
|