wrphttp provides a library implementing helper utilities for working with WRP messages over HTTP.
This project and everyone participating in it are governed by the XMiDT Code Of Conduct. By participating, you agree to this Code.
To use the wrphttp library, it first should be added as an import in the file you plan to use it. Examples can be found at the top of the GoDoc.
wrphttp interoperates with github.com/xmidt-org/wrp-go/v3/wrphttp.
Receiving: every form a wrp-go/v3 peer sends is decoded. wrp-go/v3
accepts any field on any message type, but the standard WRP validation
doesn't. If you receive such messages, pass wrp.NoStandardValidation() to
DecodeRequest or DecodeResponse.
Sending: the default options produce messages a wrp-go/v3 peer can read. Don't use these with a wrp-go/v3 peer:
- more than one message per request or response
AsJSONLorAsMsgpackLEncodeGzip,EncodeDeflateorEncodeZlibAsOctetStreamwith a style other than the defaultX-Webpa
A wrp-go/v3 server only reads header form (AsOctetStream) when it uses
DecodeEntityFromSources(_, true).
The compat module tests all of this against wrp-go/v3.
Refer to CONTRIBUTING.md.