mirror of
https://github.com/darmiel/yaxc.git
synced 2025-11-07 17:56:19 +08:00
Updated README.md
This commit is contained in:
parent
92a2259f30
commit
ccc684ee37
1 changed files with 52 additions and 0 deletions
52
README.md
52
README.md
|
|
@ -3,6 +3,58 @@ Yet Another Cross Clipboard
|
||||||
> Allan, please add details!
|
> Allan, please add details!
|
||||||
|
|
||||||
## Server
|
## Server
|
||||||
|
|
||||||
|
### Set Data
|
||||||
|
Just make a POST request to any path:
|
||||||
|
|
||||||
|
**POST** `/hi`
|
||||||
|
```
|
||||||
|
Hello World!
|
||||||
|
```
|
||||||
|
|
||||||
|
#### TTL
|
||||||
|
By default, the data is kept for 5 minutes. This TTL can be changed via the `ttl`-parameter.
|
||||||
|
|
||||||
|
**POST** `/hi?ttl=1m30s`
|
||||||
|
```
|
||||||
|
Hello World!
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Encryption
|
||||||
|
By default, the data is not encrypted.
|
||||||
|
**It is not recommended to encrypt the data on server side. The data should always be encrypted on the client side.**
|
||||||
|
|
||||||
|
However, if this is not possible, the `secret`-parameter can be used to specify a password with which the data should be encrypted.
|
||||||
|
|
||||||
|
**POST** `/hi?secret=s3cr3tp455w0rd`
|
||||||
|
```
|
||||||
|
Hello World!
|
||||||
|
```
|
||||||
|
**Produces:**
|
||||||
|
```
|
||||||
|
gwttKS3Q2l0+YR+jQF/02u3fNVmMIcVOTNSGD5vWfrYTtH8adt8r
|
||||||
|
```
|
||||||
|
|
||||||
|
### Get Data
|
||||||
|
**GET** `/hi`
|
||||||
|
```
|
||||||
|
Hello World!
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Encryption
|
||||||
|
If the data has been encrypted and should be decrypted on the server side (**which is not recommended**), the "password" can be passed via the `secret`-parameter.
|
||||||
|
**GET** `/hi`
|
||||||
|
```
|
||||||
|
gwttKS3Q2l0+YR+jQF/02u3fNVmMIcVOTNSGD5vWfrYTtH8adt8r
|
||||||
|
```
|
||||||
|
|
||||||
|
**GET** `/hi?secret=s3cr3tp455w0rd`
|
||||||
|
```
|
||||||
|
Hello World!
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### CLI
|
||||||
```bash
|
```bash
|
||||||
Run the YAxC server
|
Run the YAxC server
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue