Giter Club home page Giter Club logo

local-echo-server's Introduction

Les(Local Echo Server)

简介

Les启动后会在本地启动一个http服务,主要用于调试。

使用说明

help命令

PS D:\code\github\local-echo-server\target\release> .\les.exe --help
Usage: les.exe [OPTIONS]

Options:
  -P, --port <Port>  The http port,default port is 9345 [default: 9345]
  -h, --help         Print help
  -V, --version      Print version

直接启动(使用默认端口启动)

直接启动会在本地启动一个http服务,默认端口是9345

.\les.exe

使用其他端口启动

.\les.exe -P 9090

使用curl测试一下les的输出

curl -d "param1=value1&param2=value2" -X POST http://localhost:9345/data

{
  "body": "param1=value1&param2=value2",
  "headers": {
    "accept": "*/*",
    "accept-encoding": "gzip",
    "content-length": "27",
    "content-type": "application/x-www-form-urlencoded",
    "host": "localhost:9345",
    "user-agent": "curl/8.7.1"
  },
  "method": "POST",
  "origin": "127.0.0.1:49557",
  "path": "/data",
  "version": "HTTP/1.1"
}
curl -d "param1=value1&param2=value2" -H "Content-Type: application/x-www-form-urlencoded" -X POST http://localhost:9345/data
{
  "body": "param1=value1&param2=value2",
  "headers": {
    "accept": "*/*",
    "accept-encoding": "gzip",
    "content-length": "27",
    "content-type": "application/x-www-form-urlencoded",
    "host": "localhost:9345",
    "user-agent": "curl/8.7.1"
  },
  "method": "POST",
  "origin": "127.0.0.1:50160",
  "path": "/data",
  "version": "HTTP/1.1"
}
 curl -d "@mumu_boot.txt" -X POST http://localhost:9345/data
 {
  "body": "add_path_to_accelist path: C:\\Program Files\\Netease\\MuMuPlayer-12.0\\vms\\MuMuPlayer-12.0-base\\system.vdiprefetch dlls takes 7 msprint meta data: data_type: 1type_1, type: 1, size: 457147392 B, ele_num: 7544type_2, type: 2, size: 457147392 B, ele_num: 680avail phys: 24045 MBprefetch system vdi 435.969727 MB takes 151 msQt5WebEngineCore Path: C:\\Program Files\\Netease\\MuMuPlayer-12.0\\device\\\\..\\EmulatorShell\\Qt5WebEngineCore.dllPrefetchFileReader::open CreateFileW fail, err: 3prefetch webengine dll takes 0 ms",
  "headers": {
    "accept": "*/*",
    "accept-encoding": "gzip",
    "content-length": "510",
    "content-type": "application/x-www-form-urlencoded",
    "host": "localhost:9345",
    "user-agent": "curl/8.7.1"
  },
  "method": "POST",
  "origin": "127.0.0.1:50798",
  "path": "/data",
  "version": "HTTP/1.1"
}

注意

  • 本程序支持windows(不包含windows7及以下),Mac,Linux,可以直接去release下载。
  • 本程序目前不支持https,正在开发。

local-echo-server's People

Contributors

lsk569937453 avatar

Watchers

 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.