rest-service

command
v0.0.0-...-1f4ff24 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 30, 2020 License: MIT Imports: 7 Imported by: 0

README

REST Implementation

I used the Echo framework for the REST implementation. For reference to the framework, please go the the following site: ECHO

I have also add a Makefile that will clean the existing bin, vendor and Gopkg.lock file and the build should dep ensure with the updated Echo dependency

Run the following command to run the make file in terminal:

make

If you run into any issue with the following command, you can also run each command individually, for example:

make clean

To run the http server: Run go run main.go from the rest-service directory.

Curl Request:

To get all people in the system:

curl -X GET 'http://localhost:1323/people'

To get the requested person with an id given:

curl -X GET 'http://localhost:1323/people/df12ce76-767b-4bf0-bccb-816745df9e70'

To get the requested people base on the first and last name given:

curl -X GET 'http://localhost:1323/people?first_name=John&last_name=Doe'

To get the requested people base on the phone number given:

curl -X  GET 'http://localhost:1323/people?phone_number=+1%20(800)%20555-1313'

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL