Code Monkey home page Code Monkey logo

laravel-proxy-app's Introduction

Laravel Proxy App

Prerequisites

you must have docker-compose to run this script

and docker-compose requires

  • Docker Engine
  • Docker CLI

Installation

1 download the repose files

git clone [email protected]:abdallhsamy/laravel-proxy-app.git

2 navigate to the downloaded folder

cd laravel-proxy-app

3 download and install required dependencies

docker run --rm \
            -u "$(id -u):$(id -g)" \
            -v $(pwd):/opt \
            -w /opt \
            laravelsail/php81-composer:latest \
            composer install --ignore-platform-reqs

4 pull and install the docker containers

./vendor/bin/sail up

5 install project dependencies

./vendor/bin/sail composer install

6 create .env file

cp .env.example .env 

7 generate app key

./vendor/bin/sail php artisan key:generate

Usage

Method : POST

URL : {{baseUrl}}/api/v1/proxy

Headers :

{
    "Accept": "application/json",
    "Content-Type": "application/json"
}

Request Example :

{
    "url": "https://reqres.in/api/users",
    "method": "post",
    "body": {
        "name": "Abdallah Samy",
        "job": "software engineer"
    }
}

Response Example:

{
    "name": "Abdallah Samy",
    "job": "software engineer",
    "id": "84",
    "createdAt": "2022-10-30T11:28:25.583Z"
}

another one Request Example :

{
    "url" : "https://dummyjson.com/products/1",
    "method" : "get"
}

Response Example:

{
    "id": 1,
    "title": "iPhone 9",
    "description": "An apple mobile which is nothing like apple",
    "price": 549,
    "discountPercentage": 12.96,
    "rating": 4.69,
    "stock": 94,
    "brand": "Apple",
    "category": "smartphones",
    "thumbnail": "https://dummyjson.com/image/i/products/1/thumbnail.jpg",
    "images": [
        "https://dummyjson.com/image/i/products/1/1.jpg",
        "https://dummyjson.com/image/i/products/1/2.jpg",
        "https://dummyjson.com/image/i/products/1/3.jpg",
        "https://dummyjson.com/image/i/products/1/4.jpg",
        "https://dummyjson.com/image/i/products/1/thumbnail.jpg"
    ]
}

laravel-proxy-app's People

Contributors

elsenosy avatar abdallhsamy avatar mend-bolt-for-github[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.