zyte-api-rs

Allows access to the Zyte API proxy service.

This is an unofficial, unstable, unfinished crate. However normal usage with HTTP GET should work fine.

Prerequisites

Installation

bash cargo add zyte-api-rs

Example

```rust use zyteapirs::ZyteApi;

[tokio::main]

async fn getgoogle() { let zyteapi = ZyteApi::new("");

// simple GET
let response = zyte_api.get("https://www.google.com/").await.unwrap();

// status_code is from http::Method
if response.status_code.is_success() {
    println!("{}", response.http_response_body);
}

let response = zyte_api
    .post("https://httpbin.org/post")
    .unwrap()
    .text(r#"{"custname": "foobar"}"#)
    .send()
    .await
    .unwrap();

if response.status_code.is_success() {
    println!("{}", response.http_response_body);
}

}

```

Features

Requests

Responses

Design Goals

Notes