This Rust application fetches JSON data from a specified URL ( The url is taken after running the OCSF Schema Server docker image. ) and saves it to a file every second.
- Clone the repository
git clone https://github.com/mranv/ocsf-rust-crawler
- Build the application
cargo build
- Run the application
cargo run
The following parameters can be configured in main.rs
:
url
- URL to fetch JSON data fromduration
- Total runtime of the applicationinterval
- Interval (in seconds) between fetches
- Fetched JSON data is saved to a file named
ocsf_schema_sample_data<timestamp>.json
- Status and errors are printed to stdout
- reqwest
- serde
- serde_json
- chrono
This project is licensed under the MIT License. See LICENSE file for details.