farukbase-io-http

1.0.15 • Public • Published

Farukbase HTTP

Database

GET

http://hostname/farukbase/get/path/

returns data on /path/ as json

DELETE

http://hostname/farukbase/get/path/

deletes data on /path/

UPDATE

http://hostname/farukbase/get/path/

updates data on /path/ with JSON data

INSERT

http://hostname/farukbase/get/path/

insert a data with new key on /path/ with JSON data and returns the key

Storage

with HTTP-GET

http://hostname/directory/file.ext

Downloads the file or show the page

http://hostname/directory/

Shows index.html / index.html / index.txt / 404.html

with HTTP-PUT/POST

Upload file or files to a path

On sending directly raw data

http://hostname/directory/file.ext

Uploads file to /directory/file.ext on storage directory

On sending form/multi-part data

Single File

http://hostname/farukbase/upload/directory/file.ext

key = "file", value = {file}

Uploads file to /directory/file.ext on storage directory

Multiple File

http://hostname/farukbase/upload/

key = "/path/directory/file.ext", value = {file}

key = "/path/directory/file2.ext", value = {file}

key = "/path/other-directory/file3.ext", value = {file}

Uploads files to /path/directory/file.ext,/path/directory/file2.ext,/path/other-directory/file3.ext on storage directory

with HTTP-DELETE

Deletes file on path and returns old files information

Readme

Keywords

none

Package Sidebar

Install

npm i farukbase-io-http

Weekly Downloads

21

Version

1.0.15

License

MIT

Last publish

Collaborators

  • farukcan