Skip to content

Latest commit

 

History

History
58 lines (37 loc) · 2.25 KB

README.org

File metadata and controls

58 lines (37 loc) · 2.25 KB

./banner.png

Chibiko, URL shortener written in GO and store the URL inside MySQL database

Documentation

Diagram

./Sequence.png

Endpoints

There’s serveral endpoint interface that user can interact with, they are :

MethodUrlsDescriptions
POST/endcodeEndcode the url given in body payload
GET/{code}Redirecting code to the actual endpoint

Usages

Standard Payload and Response for the APIs

Encode

Request

Json requestDescriptionsType data
urlTarget URL that want to decode MandatoryString
isTemporaryIf this form not empty, the url will be temporary for the desirable time (in second)Int

Response

Http codeMessageObjectDescription
201oksomeEncodedUrlSuccess and the url is encoded
400errorfield … is missing or errorRequest error
500errorinternal server errorServer side error

Redirect

Request

ParameterDescriptionsType data
{encodedParameter}Encoded URL that already decoded MandatoryString

Response

Http codeMessageObjectDescription
200oksomeEncodedUrlSuccess and the url is encoded
400errorfield … is missing or errorRequest error
500errorinternal server errorServer side error