Renamed to anmolitor/elm-grpc. It is published under that name, and new versions come out there.
Versions published as andreasewering/elm-grpc still install under that name. 5 versions of 6 come from the new location (see their notes).
Rerouted (renamed, verified). The GitHub user or repository was renamed. The tag is still there, at the new name. The Lamdera package server serves a copy recovered from https://github.com/anmolitor/elm-grpc.
What we checked: The repo moved to github.com/anmolitor/elm-grpc. Rebuilt with git archive from commit 93cb5ab49c6e of https://github.com/anmolitor/elm-grpc (zip prefix andreasewering-elm-grpc-93cb5ab/, America/Los_Angeles times): the zip is byte-identical to the one package.elm-lang.org recorded, SHA-1 74cb01c6c41c0f3cf799a325adbf2b0c64043d45.
The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.
Details · package.elm-lang.org's zip: https://github.com/andreasewering/elm-grpc/zipball/1.1.0/
This is the public API for gRPC application usage. It is intended to be imported qualified.
A request to the server that has not been sent yet. This is designed to be used in a builder-pattern kind of way:
Grpc.new helloWorld "hello"
|> Grpc.addHeader "authorization" token
|> Grpc.setHost "http://example.com"
In this example `helloWorld` could be a value of type `Rpc String String` that was generated by `protoc-gen-elm`.Build a request from an rpc endpoint by providing a request body.
Add a header to a request. The first parameter is the header name, the second parameter is the value.
Add multiple headers at once to a request.
Set the host for the request. By default the host is empty (i.e. the current website), which is recommended to avoid CORS issues.
Make the request cancel itself after a given timeout in milliseconds.
The tracker lets you cancel and track requests via Http.cancel and Http.track.
This only works if you use toCmd to send your Request, Tasks unfortunately do not support this.
We use the type system to our advantage here to prevent you from calling toTask after using this function.
Make the request "risky" (i.e. "withCredentials=true" in javascript). This allows Set-Cookie to function in gRPC responses.
Convert the given RpcRequest into a Task. This can be useful if you want to chain multiple requests but are only
interested in the end result.
Convert the given RpcRequest into a Command to make the Elm runtime execute the request.
A gRPC request may fail with in a variety of ways. Since the request is just a HTTP request under the hood, it may fail in the roughly same ways a HTTP request could.
BadUrl means you did not provide a valid URL.
Timeout means it took too long to get a response.
NetworkError means the user turned off their wifi, went in a cave, etc.
BadStatus means you got a response back, but the http status code indicates failure. This can be either
a bad HTTP status code or a bad grpc-status response header according to
https://github.com/grpc/grpc/blob/master/doc/http-grpc-status-mapping.md
BadBody means you got a response back with a nice status code, but the body
of the response was something unexpected. The Bytes in this case is the response that failed to be parsed.
UnknownGrpcStatus means you got a response back but the grpc-status header was set to either
- something that is not an `Int`
- an `Int` that is outside of the range of the `ErrCode` enum.
Note that not setting the header is fine and will delegate failure checking to the HTTP status.A valid grpc-status header encodes one of these possibilities as an Int.
0 -> Ok_1 -> Cancelled2 -> Unknown
Opaque type for an rpc endpoint. These should be constructed by the
protoc-gen-elmcode generator. If for some reason, you need to define an endpoint by hand, you can do so by importing theGrpc.Internalmodule.