Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/helloimalemur/rocket-simple-api-example

An api example written in Rust, using the Rocket framework.
https://github.com/helloimalemur/rocket-simple-api-example

Last synced: 5 days ago
JSON representation

An api example written in Rust, using the Rocket framework.

Awesome Lists containing this project

README

        

## Edit config/Settings.toml
```toml
api_key = "yourapikey"
```

## test and dev functions;

```shell
# postdata;
curl -XPOST -H 'x-api-key:yourapikey' -H 'Content-Type:application/json' http://127.0.0.1:8030/api/login -d '{"username": "foxx","password": "doxx","ipaddress": "0.0.0.0"}'
```
```shell
# get data
curl -XGET -H 'x-api-key:yourapikey' http://127.0.0.1:8030/api/
```