Update readme
This commit is contained in:
38
README.md
38
README.md
@@ -23,18 +23,6 @@ You can submit content most easily using [curl](https://curl.se/docs/manpage.htm
|
||||
> echo "Hello world" | curl -T - https://api.pastes.dev/post
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>If curl isn't installed on your system, you can also post using <b>netcat</b>.</summary>
|
||||
|
||||
```shell
|
||||
# Pipe in some output from any command
|
||||
> echo "Hello world" | nc nc.pastes.dev 1337
|
||||
|
||||
# Upload the contents of a file
|
||||
> cat example.txt | nc nc.pastes.dev 1337
|
||||
```
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>If you don't want to do so much typing, you can create a shorter <b>alias</b>.</summary>
|
||||
|
||||
@@ -56,8 +44,8 @@ You can submit content most easily using [curl](https://curl.se/docs/manpage.htm
|
||||
```
|
||||
</details>
|
||||
|
||||
##### 3) From Code
|
||||
Send GET/POST/PUT requests to `https://api.pastes.dev/`. More info [below](#pastesdev-api).
|
||||
##### 3) From Code / Scripts
|
||||
Please see the [API Documentation](/API.md). :)
|
||||
|
||||
___
|
||||
|
||||
@@ -66,28 +54,6 @@ The frontend _(this repository)_ is written using the React framework. The backe
|
||||
|
||||
The user-interface is based on the [Monaco Editor](https://microsoft.github.io/monaco-editor/), the engine behind the popular Visual Studio Code text editor. It's quite simple; it supports syntax highlighting, automatic indentation, many supported languages, themes, zooming in/out, linking to specific lines or sections, and more!
|
||||
|
||||
### pastes.dev
|
||||
|
||||
I host a public instance at https://pastes.dev. Please feel free to use it to share code/configs/whatever!
|
||||
|
||||
Please note that the following (very-non-legally worded) [terms of service](https://github.com/lucko/bytebin#public-instances) apply.
|
||||
If you come across any content which is illegal or infringes on copyright, please [get in touch](https://lucko.me/contact) and let me know so I can remove it.
|
||||
|
||||
Uploaded content is retained for 90 days then deleted.
|
||||
|
||||
### pastes.dev API
|
||||
|
||||
* To **read** content, send a HTTP `GET` request to `https://api.pastes.dev/<key>`.
|
||||
* Replace `<key>` with the id of the paste.
|
||||
* The content is returned in the response body.
|
||||
* The `Content-Type` header is `text/<language>`, where language is the id of the language the paste was saved with.
|
||||
* To **upload** content, send a HTTP `POST` request to `https://api.pastes.dev/post`.
|
||||
* Include the content in the request body.
|
||||
* Specify the language with the `Content-Type: text/<language>` header, and please provide a `User-Agent` header too.
|
||||
* The paste "key" is returned in the `Location` header, or in the response body as a JSON object in the format `{"key": "<key>"}`.
|
||||
|
||||
The API is powered by the [bytebin](https://github.com/lucko/bytebin) service, so more information about how it works can be found there.
|
||||
|
||||
___
|
||||
|
||||
### Self-hosting
|
||||
|
||||
Reference in New Issue
Block a user