Skip to content

marceloFerreira90/ApiResponseToUrlList

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API response to URl list

Description:

This is an example API that performs a GET request and retrieves a list of URLs avaiable in the response.

About:

How to

    1. Before starting: On a terminal at the root folder of the project
yarn install
or
npm install
    1. To test
yarn test
or 
npm run test
    1. To Run
yarn start
or 
npm run start

Use a API testing App (e.g. Postman) and target GET > https://localhost:3000?Url='URL TO BE TARGETTED'

Future Improvements

  • Adding behaviour testing - Due to time constraints only TDD has been applied to the project, using CucumberJs i would add some behaviour testing

  • Performance improvements - As a phase 2 for this project I would make the project more performant.

    • Removing the Regex for a more defined approach - as an Assumption I use HTML, XML and JSON responses, so I could have a method for each response type and restrict the filter to each individual element
    • A Reducer could be used , since the response comes back as a single Stringified JSON value this could reduce the overhead
  • Improving security

    • Would had some conditions to the parameter to make sure no scripts could be passed in as part of the URL, therefore removing any XSS vulnerability that may arise
    • Adding some API caching to reduce the number of hits and avoid DDOS

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published