docs: document 0.1.0 crate release
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
# wip-http
|
||||
|
||||
Framework-independent WIP over HTTP v1 endpoint, route, JSON codec, and response-classification support.
|
||||
|
||||
The crate maps the three WIP Core interactions to fixed HTTP routes and strict UTF-8 JSON representations. It constructs and validates `http` request and response values but deliberately performs no network I/O and does not define TLS, authentication, proxy, or connection policy.
|
||||
|
||||
```toml
|
||||
[dependencies]
|
||||
wip-http = "0.1.0"
|
||||
```
|
||||
|
||||
```rust
|
||||
use wip_http::wip_protocol::ObserveRequest;
|
||||
use wip_http::{Endpoint, Limits, encode_observe_request};
|
||||
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let endpoint = Endpoint::parse("https://example.test/wip")?;
|
||||
let limits = Limits::new(64 * 1024, 1024 * 1024, 64)?;
|
||||
let request = encode_observe_request(
|
||||
&endpoint,
|
||||
&ObserveRequest { path: "/".into(), depth: 0 },
|
||||
limits,
|
||||
)?;
|
||||
assert_eq!(request.uri(), "https://example.test/wip/v1/observe");
|
||||
Ok(())
|
||||
}
|
||||
```
|
||||
|
||||
See the [API documentation](https://docs.rs/wip-http) for codec and failure-boundary details.
|
||||
|
||||
Licensed under either of Apache-2.0 or MIT at your option.
|
||||
Reference in New Issue
Block a user