Skip to content

This Rust application fetches JSON data from a configurable URL and saves the response to a file. It runs for a specified duration, printing output and errors.

License

Notifications You must be signed in to change notification settings

mranv/ocsf-rust-crawler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OCSF Rust Crawler

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.

Usage

  1. Clone the repository
git clone https://github.com/mranv/ocsf-rust-crawler
  1. Build the application
cargo build
  1. Run the application
cargo run  

Configuration

The following parameters can be configured in main.rs:

  • url - URL to fetch JSON data from
  • duration - Total runtime of the application
  • interval - Interval (in seconds) between fetches

Output

  • Fetched JSON data is saved to a file named ocsf_schema_sample_data<timestamp>.json
  • Status and errors are printed to stdout

Dependencies

  • reqwest
  • serde
  • serde_json
  • chrono

License

This project is licensed under the MIT License. See LICENSE file for details.

About

This Rust application fetches JSON data from a configurable URL and saves the response to a file. It runs for a specified duration, printing output and errors.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages