Designing API
- What kind of resources are needed
- What kind of actions will be taken
- What kind of endpoints should be designed
Testing API
Testing API using curl
GET Method
curl 'https://[URL]/[resource].json'
curl -X PUT -d '{"key":{"nested_key":"value"}}' \
'https://[PROJECT_ID].firebaseio/users/tom.json'
curl -X PATCH -d '{"key":"value"}' \
'https://[URL]/[resource].json'
curl -X POST -d '{"key":{"nested_key":"value"}}' \
'https://[PROJECT_ID].firebaseio/users/tom.json'
curl -X DELETE \
'https://[PROJECT_ID].firebaseio/users/tom.json'
Use curl to check the documentation to see what the API does
Use curl to check the documentation to see what the API does
No comments:
Post a Comment