GithubHelp home page GithubHelp logo

94b1 / jsonstore Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bluzi/jsonstore

0.0 1.0 0.0 215 KB

:floppy_disk: :rocket: Store your data just by sending simple HTTP requests

Home Page: https://www.jsonstore.io/

License: MIT License

JavaScript 74.69% CSS 17.09% HTML 8.22%

jsonstore's Introduction

Start storing your data in the cloud in 2 seconds

jsonstore.io

jsonstore.io offers a free, secured and JSON based cloud datastore for small projects. Just enter https://www.jsonstore.io/, copy the URL and start sending HTTP requests to communicate with your datastore. POST requests will save data, PUT requests modify data, DELETE requests delete data and GET requests retrieves data.

Examples

Make sure to replace the URL in the examples to your own endpoint, that can be found at https://www.jsonstore.io/.

CURL

POST

The following command will create a user in /users/1:

curl -XPOST -H "Content-type: application/json" -d '{
  "name": "john.snow",
  "age": 31
}' 'https://www.jsonstore.io/cf024bb815a93131ce9fed91b1f9dafa43a3c557e9be66e66fd76df5c64f10fe/users/1'

GET

The following command will retrieve the user we created earlier:

curl -XGET -H "Content-type: application/json" 'https://www.jsonstore.io/cf024bb815a93131ce9fed91b1f9dafa43a3c557e9be66e66fd76df5c64f10fe/users/1'

PUT

The following command will change the age of the user to 32:

curl -XPUT -H "Content-type: application/json" -d '32' 'https://www.jsonstore.io/cf024bb815a93131ce9fed91b1f9dafa43a3c557e9be66e66fd76df5c64f10fe/users/1/age'

DELETE

The following command will delete the user:

curl -XGET -H "Content-type: application/json" 'https://www.jsonstore.io/cf024bb815a93131ce9fed91b1f9dafa43a3c557e9be66e66fd76df5c64f10fe/users/1'

JavaScript

POST

fetch('https://www.jsonstore.io/cf024bb815a93131ce9fed91b1f9dafa43a3c557e9be66e66fd76df5c64f10fe/users/1', {
  headers: {
    'Content-type': 'application/json'
  },
  method: 'POST',
  body: { name: 'john snow', age: 31 },
});

GET

const user = await fetch('https://www.jsonstore.io/cf024bb815a93131ce9fed91b1f9dafa43a3c557e9be66e66fd76df5c64f10fe/users/1')
  .then(function(response) {
    return response.json();
  })

PUT

fetch('https://www.jsonstore.io/cf024bb815a93131ce9fed91b1f9dafa43a3c557e9be66e66fd76df5c64f10fe/users/1/age', {
  headers: {
    'Content-type': 'application/json'
  },
  method: 'PUT',
  body: 32,
});

DELETE

fetch('https://www.jsonstore.io/cf024bb815a93131ce9fed91b1f9dafa43a3c557e9be66e66fd76df5c64f10fe/users/1', {
  method: 'DELETE',
});

Contribution

Any type of feedback, pull request or issue is welcome.

jsonstore's People

Contributors

bluzi avatar brahma-dev avatar 94b1 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.