Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/santosreis/symfony6-url-shortener

Backend URL Shortener to integrate with frontend following frontend: vue-url-shortener.
https://github.com/santosreis/symfony6-url-shortener

php php8 rest-api symfony symfony6

Last synced: about 2 months ago
JSON representation

Backend URL Shortener to integrate with frontend following frontend: vue-url-shortener.

Awesome Lists containing this project

README

        

## URL Shortener

Backend URL Shortener to integrate with frontend following frontend: [vue-url-shortener](https://github.com/SantosReis/vue-url-shortener).

NOTE: SQLite is enabled to use.

### API endpoints available

POST /api/shortener Generate URL Shortener

##### Parameters

> | name | type | data type | description |
> | ----- | -------- | ------------ | ----------------------- |
> | `url` | required | string (255) | The url to be shortened |

##### Responses

> | http code | content-type | response |
> | --------- | ------------------ | ----------- |
> | `200` | `application/json` | JSON string |

##### Example cURL

> ```javascript
> curl -X GET -H "Content-Type: application/json" http://localhost:8889/api/shortener
> ```

GET /api/shortener-list Listing URL Shorteners

##### Parameters

> None

##### Responses

> | http code | content-type | response |
> | --------- | -------------------------- | ----------- |
> | `200` | `text/plain;charset=UTF-8` | JSON string |

##### Example cURL

> ```javascript
> curl -X GET -H "Content-Type: application/json" http://localhost:8889/api/shortener-list
> ```