HttPlaceholder logo

HttPlaceholder

  •  0 ratings
In category: Software Development / IDE & Tools

About HttPlaceholder

Quickly mock away any webservice using HttPlaceholder. HttPlaceholder lets you specify what the request should look like and what response needs to be returned.

  •   552  
  •   0  
  •   0  
  •   0  
Github stats:
  •  Commits: N/A  
  •   N/A  
  •   N/A  
  •  Latest commit: N/A  

Deploy this app to Linode with a free $100 credit!

Languages/Platforms/Technologies:
Lincenses:

More about HttPlaceholder

Logo

HttPlaceholder
Quickly stub away any HTTP service.

Report a Bug · Request a Feature · Ask a Question

[![license](https://img.shields.io/github/license/dukeofharen/httplaceholder.svg?style=flat-square)](LICENSE) [![PRs welcome](https://img.shields.io/badge/PRs-welcome-ff69b4.svg?style=flat-square)](https://github.com/dukeofharen/httplaceholder/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) [![code with hearth by dukeofharen](https://img.shields.io/badge/%3C%2F%3E%20with%20%E2%99%A5%20by-dukeofharen-ff1414.svg?style=flat-square)](https://github.com/dukeofharen) [![pipeline status](https://gitlab.com/ducode/httplaceholder/badges/master/pipeline.svg)](https://gitlab.com/ducode/httplaceholder/-/commits/master) [![Docker pulls](https://img.shields.io/docker/pulls/dukeofharen/httplaceholder)](https://hub.docker.com/r/dukeofharen/httplaceholder) [![Nuget downloads](https://img.shields.io/github/downloads/dukeofharen/httplaceholder/total?label=nuget)](https://www.nuget.org/packages/HttPlaceholder/)
Table of Contents - [About](#about) - [Built With](#built-with) - [Getting Started](#getting-started) - [Prerequisites](#prerequisites) - [Installation](#installation) - [Example](#example) - [Getting started](#getting-started) - [Documentation](docs/docs.md) - [Tools](#tools) - [Roadmap](#roadmap) - [Support](#support) - [Project assistance](#project-assistance) - [Contributing](#contributing) - [Authors & contributors](#authors--contributors) - [Security](#security) - [License](#license)

About

HttPlaceholder lets you stub away any HTTP webservice.

It was thought up while I was working at a company which had many interconnected webservices. The development process was very painful, because it meant all the other webservices should also be started on my local dev PC, or I had to use the "development" environment, which did not work for half of the time. HttPlaceholder fills this gap nicely.

HttPlaceholder:

  • can easily be installed on your dev PC.
  • can be used to easily create stubs, either as separate YAML files, through the API or through the user interface.
  • can easily be hosted on any server.
  • can use many different HTTP condition checkers and response writers to make your HTTP stubs as specific as you need.

Also visit the website: https://httplaceholder.org/

Built With

Getting Started

Prerequisites

Linux, Windows and Mac are supported.

Installation

Follow these steps to install / update HttPlaceholder. If you update HttPlaceholder, make sure to read the changelog to see if there are no breaking changes.

Install on Windows

Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/dukeofharen/httplaceholder/master/scripts/Install-Windows.ps1'))

Install on Linux

curl -o- https://raw.githubusercontent.com/dukeofharen/httplaceholder/master/scripts/install-linux.sh | bash

Install on Mac

curl -o- https://raw.githubusercontent.com/dukeofharen/httplaceholder/master/scripts/install-mac.sh | bash

Docker

HttPlaceholder has a Docker image; it can be found here.

Run the following command to run a basic HttPlaceholder container: docker run -p 5000:5000 dukeofharen/httplaceholder:latest

Install as .NET tool

dotnet tool install --global HttPlaceholder

Example

  • Install HttPlaceholder (see Installation).
  • Create a new .yaml file (e.g. stub.yaml).
  • Copy and paste these contents in your new file:
- id: situation-01
  conditions:
    method: GET
    url:
      path:
        equals: /users
      query:
        id:
          equals: 12
        filter:
          equals: first_name
  response:
    statusCode: 200
    text: |
      {
        "first_name": "John"
      }
    headers:
      Content-Type: application/json
  • Open the terminal in the folder you've added the stub.yaml file and run the following command: httplaceholder. HttPlaceholder will now start and will load the stubs in the current folder.

  • Perform a specific HTTP call to HttPlaceholder so your provided response will be returned.

  • For Linux / Mac (cURL needs to be installed):
    curl "http://localhost:5000/users?id=12&filter=first_name" -D-
  • For Windows (uses Powershell):

    (Invoke-WebRequest "http://localhost:5000/users?id=12&filter=first_name").RawContent

  • You can view and inspect the performed requests in the user interface at http://localhost:5000/ph-ui.

For more sophisticated examples, go to the samples to view samples for all supported HTTP condition checkers and response writers. Learn more about HttPlaceholder by reading the documentation.

Documentation

Tools

Roadmap

See the open issues for a list of proposed features (and known issues).

Support

Reach out to the maintainer at one of the following places:

Project assistance

If you want to say thank you or/and support active development of HttPlaceholder:

Contributing

First off, thanks for taking the time to contribute! Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make will benefit everybody else and are greatly appreciated.

We have set up a separate document containing our contribution guidelines.

Thank you for being involved!

Authors & contributors

The original setup of this repository is by dukeofharen (https://ducode.org).

For a full list of all authors and contributors, check the contributor's page.

Security

HttPlaceholder follows good practices of security, but 100% security can't be granted in software. HttPlaceholder is provided "as is" without any warranty. Use at your own risk.

For more info, please refer to the security.

License

This project is licensed under the MIT license.

See LICENSE for more information.

Comments (0)

Please login to join the discussion on this project.

HttPlaceholder Reviews (0)

Overall Rating

None

based on 0 ratings

Please login to review this project.

No reviews for this project yet.

↑ back to top

pCloud Lifetime

Popular Projects

FluxBB

in Social Networks and Forums
 33k    0    0    0  

Nextcloud

in File Transfer & Synchronization
 20k    1    1    0  

Libreddit

in Social Networks and Forums
 7k    0    1    0  

CasaOS

in Self-hosting Solutions
 5k    0    0    0  

Dashboard

in Personal Dashboards
 5k    0    0    0  

Audiobookshelf

in Audio Streaming
 5k    0    1    0  

Mediagoblin

in Photo and Video Galleries
 4k    0    0    0  

Most Discussed

Nextcloud

in File Transfer & Synchronization
 20k    1    1    0  

Tube Archivist

in Automation
 3k    0    1    0  

OneDev

in Project Management
 2k    0    0    0  

iodine

in Proxy
 2k    0    0    0  

Alf.io

in Booking and Scheduling
 2k    0    0    0  

sysPass

in Password Managers
 1k    0    0    0  

Misskey

in Social Networks and Forums
 2k    0    0    0  
Linux VPS from $11/yr.
RackNerd VPS for $11.38/mo

Top Rated Projects

Gitea

 1 rating
in Project Management

Bagisto

 1 rating
in E-commerce

LinkAce

 1 rating
in Bookmarks and Link Sharing

Pydio

 1 rating
in File Transfer & Synchronization

Audiobookshelf

 1 rating
in Audio Streaming

Nextcloud

 1 rating
in File Transfer & Synchronization

Seafile

 1 rating
in File Transfer & Synchronization

Categories

You May Also Be Interested In

RStudio Server logo
RStudio Server cover

RStudio Server

Web browser based IDE for R.

Wakapi logo
Wakapi cover

Wakapi

Tracking tool for coding statistics, compatible with WakaTi…

Hakatime logo
Hakatime cover

Hakatime

WakaTime server implementation with analytics dashboard.