It's here a way to manage a contact list using essential methods of HTTP requests and responses!
4 methods, 4 ways to use CRUD:
- It's possible create a new contact
- Want read all contacts? You can
- Update a contact is easy
- Warning! You can delete a contact
This API was developed using Go(Golang) and some features/packages.
This is an example of how you can implements and use this API from Postman.
- Postman
- Golang
- Clone the repo
git clone https://github.com/brunodeev/contact-list.git
- Initialize go mod and run go mod tidy for update packages
go mod init example-module
go mod tidy
http://ip:port/contactshttp://ip:port/contacts{
"name": "Example",
"phones": [
{
"code": "+00",
"ddd": "000",
"number": "000000000"
}
]
}http://ip:port/contacts?id=example{
"name": "NewExample",
"phones": [
{
"code": "+11",
"ddd": "111",
"number": "111111111"
}
]
}http://ip:port/contacts?id=exampleIf you have a suggestion that would make this better, please fork the repo and create a pull request. Thanks!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/contact-feature) - Commit your Changes (
git commit -m 'Add some feature contact') - Push to the Branch (
git push origin feature/contact-feature) - Open a Pull Request
Bruno César - bcgmeireles@gmail.com
Project Link: https://github.com/brunodeev/contact-list