httptoy

command module
v0.0.0-...-2528519 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2023 License: MIT Imports: 2 Imported by: 0

README

httptoy 🎉

A powerful HTTP Request & Response Service. Inspired by httpbin.org / Github Which is now outdated.

Features

  • Light Weight & Easy to setup
  • Docker image available
  • One command installation

Run locally

docker pull mayankfawkes/httptoy
docker run -p 8000:8000 mayankfawkes/httptoy

API Endpoints

Under {} of url path are path parameters, if invalid parameters are found then they will be set to default values, all ints have 0 as default value if invalid parameter is passed.

Methods
GET /get
POST /post
DELETE /delete
PATCH /patch
PUT /put
Auth
GET /basic/{username}/{password}
GET /basic
GET /bearer
Parameter Type Description
username string Required Username for auth
password string Required Password for auth
Compression
GET /deflate
GET /brotli
GET /zlib
GET /gzip
GET /utf8
Cookies
GET /cookies
GET /cookies/set/{key}/{value}
GET /cookies/delete/{key}
Parameter Type Description
key string Required Cookie name
value string Required Cookie value
Images
GET /image
GET /image/png
GET /image/jpeg
GET /image/svg
GET /image/webp
Redirect
GET /redirect/{times}
GET /redirect-delay/{delay}/{times}
Parameter Type Description
times int Required Number of time redirect
delay int Required Delay in redirect in seconds
Request Inspection
GET /headers
GET /header/{header_name}
GET /ip
Parameter Type Description
header_name string Required Name of the request header
Response
GET /bytes/{count}
GET /base64en/{data}
GET /base64de/{data}

GET /delay/{seconds}
POST /delay/{seconds}
DELETE /delay/{seconds}
PUT /delay/{seconds}
PATCH /delay/{seconds}

GET /uuid
GET /body/{data}
GET /text
GET /json
GET /xml
GET /yaml
GET /html

Parameter Type Description
count int Required Number of random bytes return
data string Required String data
seconds int Required Duration in seconds
Response Status
GET /status/{code}
POST /status/{code}
DELETE /status/{code}
PUT /status/{code}
PATCH /status/{code}
Parameter Type Description
code int Required Valid HTTP Status Codes

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL