冷雨API
返回接口列表

ProtoBuffer(pb)转16进制

ProtoBuffer(pb)转16进制,用于发送消息,处理消息,修改内容等等

POST
总调用次数:36 今日调用:0 返回格式:application/json

接口地址

https://lengy.top/API/proto/proto_en.php

请求参数

参数 类型 必填 说明
body string 必填 JSONObject数据可视化后传入,不需要body=,直接传

返回码说明

暂无返回码说明

返回结果

点击「请求」按钮,查看接口返回结果

多语言调用示例

cURL
curl -X POST "https://lengy.top/API/proto/proto_en.php" \
     -H "Content-Type: application/x-www-form-urlencoded" \
     -d "body=your_body"
Python
import requests

url = "https://lengy.top/API/proto/proto_en.php"
data = {
    'body': 'your_body'
}
response = requests.post(url, data=data)
print(response.text)
PHP
<?php
$url = "https://lengy.top/API/proto/proto_en.php";
$data = [
    'body' => 'your_body'
];
$options = [
    'http' => [
        'method' => 'POST',
        'header' => 'Content-type: application/x-www-form-urlencoded',
        'content' => http_build_query($data)
    ]
];
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
echo $result;
?>
JavaScript
// 使用fetch发送POST请求
const url = 'https://lengy.top/API/proto/proto_en.php';
const data = new URLSearchParams({
    'body': 'your_body'
});

fetch(url, {
    method: 'POST',
    headers: {
        'Content-Type': 'application/x-www-form-urlencoded',
    },
    body: data
})
  .then(res => res.json())
  .then(data => console.log(data))
  .catch(err => console.error('请求失败:', err));
Java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class ApiRequest {
    public static void main(String[] args) throws Exception {
        HttpClient client = HttpClient.newHttpClient();
        String url = "https://lengy.top/API/proto/proto_en.php";
        String body = "body=your_body";
        
        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create(url))
                .method("POST", HttpRequest.BodyPublishers.ofString(body))
                .header("Content-Type", "application/x-www-form-urlencoded")
                .build();

        client.sendAsync(request, HttpResponse.BodyHandlers.ofString())
                .thenApply(HttpResponse::body)
                .thenAccept(System.out::println)
                .join();
    }
}
Go
package main

import (
	"fmt"
	"net/http"
	"strings"
	"io/ioutil"
)

func main() {
	url := "https://lengy.top/API/proto/proto_en.php"
	body := strings.NewReader("body=your_body")
	
	req, err := http.NewRequest("POST", url, body)
	if err != nil {
		fmt.Println("创建请求失败:", err)
		return
	}
	req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
	
	client := &http.Client{}
	resp, err := client.Do(req)
	if err != nil {
		fmt.Println("请求失败:", err)
		return
	}
	defer resp.Body.Close()
	
	body, _ := ioutil.ReadAll(resp.Body)
	fmt.Println(string(body))
}
C#
using System;
using System.Net.Http;
using System.Collections.Generic;
using System.Threading.Tasks;

class Program
{
    static async Task Main()
    {
        using var client = new HttpClient();
        var url = "https://lengy.top/API/proto/proto_en.php";
        var content = new FormUrlEncodedContent(new Dictionary<string, string>
            {
                {"body", "your_body"}
            });
        
        var response = await client.SendAsync(new HttpRequestMessage
        {
            Method = new HttpMethod("POST"),
            RequestUri = new Uri(url),
            Content = content
        });
        
        var result = await response.Content.ReadAsStringAsync();
        Console.WriteLine(result);
    }
}
Shell
# 使用curl发送POST请求
curl -X POST "https://lengy.top/API/proto/proto_en.php" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "body=your_body"
词库
# Secluded/QRspeed/ClousX6
A:$访问 POST $
Kotlin
import okhttp3.FormBody
import okhttp3.OkHttpClient
import okhttp3.Request

fun main() {
    val client = OkHttpClient()
    val url = "https://lengy.top/API/proto/proto_en.php"
    
    // POST 请求构建表单
val formBody = FormBody.Builder()
    .add("body", "your_body")
    .build()
val request = Request.Builder()
    .url(url)
    .method("POST", formBody)
    .build()
    
    client.newCall(request).execute().use { response ->
        if (!response.isSuccessful) throw RuntimeException("请求失败: ${response.code}")
        println(response.body?.string())
    }
}