Sorry if I don't fork and create a pull request; my JS knowledge is very limited so I'm not confident enough
I think it would be really useful to have a mechanism to append text to a pad instead of replacing its value (i.e use appendText instead of setText)
That could be a either a new endpoint:
curl -X POST -d @datafile.txt -H 'X-PAD-ID: test123' http://10.0.0.215/append
or by (ab)using the PATCH method on the existing one:
curl -X PATCH -d @datafile.txt -H 'X-PAD-ID: test123' http://10.0.0.215/post
(obviously in both cases if X-PAD-ID is not provided or it points to a nonexisting pad a creation would happen instead of appending)
Sorry if I don't fork and create a pull request; my JS knowledge is very limited so I'm not confident enough I think it would be really useful to have a mechanism to append text to a pad instead of replacing its value (i.e use
appendText
instead ofsetText
)That could be a either a new endpoint:
curl -X POST -d @datafile.txt -H 'X-PAD-ID: test123' http://10.0.0.215/append
or by (ab)using the PATCH method on the existing one:
curl -X PATCH -d @datafile.txt -H 'X-PAD-ID: test123' http://10.0.0.215/post
(obviously in both cases if X-PAD-ID is not provided or it points to a nonexisting pad a creation would happen instead of appending)