接口地址:http://yesx2.com/api/app.php?s=App.Student.Api  

接口描述: 请输入接口功能描述

接口参数

参数名字类型是否必须默认值其他说明
access_token字符串可选访问令牌,仅当开启签名验证时需要传递,生成令牌可使用App.Auth.ApplyToken接口

返回字段

返回结果类型说明
ret整型状态码,200表示成功,4xx表示客户端非法请求,5xx表示服务器错误
data对象或混合类型业务数据,由各自接口指定,通常为对象
msg字符串提示信息,失败时的错误提示

在线测试   


参数是否必须
service 必须
access_token 可选

客户端请求示例

{
    "ret": 200,
    "data": null,
    "msg": ""
}
curl --location --request GET 'https://www.api.com/api/app.php?s=App.Student.Api '  --header 'User-Agent: api/1.0.0 (https://api.com)'
<?php
require_once dirname(__FILE__) . '/PhalApiClient.php';

$client = PhalApiClient::create()
    ->withHost('http://yesx2.com/api/app.php');

$curl = curl_init();

curl_setopt_array($curl, array(
   CURLOPT_URL => 'https://www.api.com/api/app.php?s=App.Student.Api ',
   CURLOPT_RETURNTRANSFER => true,
   CURLOPT_ENCODING => '',
   CURLOPT_MAXREDIRS => 10,
   CURLOPT_TIMEOUT => 0,
   CURLOPT_FOLLOWLOCATION => true,
   CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
   CURLOPT_CUSTOMREQUEST => 'GET',
   CURLOPT_HTTPHEADER => array(
      'User-Agent: api/1.0.0 (https://api.com)'
   ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

// ret状态码,200表示成功
var_dump($rs->getRet());
// 业务数据
var_dump($rs->getData());
// 提示信息
var_dump($rs->getMsg());
#-*- coding:utf-8 -*-
import PhalApiClient
import http.client

conn = http.client.HTTPSConnection("https://www.api.com")
payload = ''
headers = {
   'User-Agent': 'Apifox/1.0.0 (https://api.com)'
}
conn.request("GET", "/api/app.php?s=App.Student.Api ", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
//FullscreenActivity.java
import net.phalapi.sdk.*;

OkHttpClient client = new OkHttpClient().newBuilder()
   .build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
   .url("http://api.com/api/app.php?s=App.Student.Api ")
   .method("GET", body)
   .addHeader("User-Agent", "api/1.0.0 (https://api.com)")
   .build();
Response response = client.newCall(request).execute();
var client = new RestClient("http://api.com/api/app.php?s=App.Student.Api ");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
client.UserAgent = "api/1.0.0 (https://api.com)";
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
package main

import (
	"./PhalApiClient"
	"fmt"
	"net/url"
)
package main

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

func main() {

   url := "http://api.com/api/app.php?s=App.Student.Api "
   method := "GET"

   client := &http.Client {
   }
   req, err := http.NewRequest(method, url, nil)

   if err != nil {
      fmt.Println(err)
      return
   }
   req.Header.Add("User-Agent", "api/1.0.0 (https://api.com)")

   res, err := client.Do(req)
   if err != nil {
      fmt.Println(err)
      return
   }
   defer res.Body.Close()

   body, err := ioutil.ReadAll(res.Body)
   if err != nil {
      fmt.Println(err)
      return
   }
   fmt.Println(string(body))
}

错误列表

错误状态码错误描述信息
400表示客户端参数错误
404表示接口服务不存在
500表示服务端内部错误

本文档生成时间:2024-12-21 22:02:48

var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?bbd0e84d1a1464f844d594adc1610100"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })();