File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# ColoyrServer
22
3- ## 接口编写
3+ ## 接口代码编写
44[ 返回] ( code.md )
55
66默认的接口代码
@@ -46,11 +46,11 @@ public dynamic main(HttpRequest http)
4646 return " true" ;
4747}
4848```
49- 接口函数输入的参数必须是[ ColoryrServer.SDK.HttpRequest] ( ../ColoryrServer/Core/SDK/HttpSDK.cs )
49+ 接口函数输入的参数必须是[ ColoryrServer.SDK.HttpRequest] ( ../ColoryrServer/Core/SDK/HttpSDK.cs#L7 )
5050并且需要带有[ ColoryrServer.SDK.NotesSDK] ( ../ColoryrServer/Core/SDK/NotesSDK.cs ) 的属性
5151
52- ## 接口请求参数
53- 接口函数传入的对象为[ ColoryrServer.SDK.HttpRequest] ( ../ColoryrServer/Core/SDK/HttpSDK.cs )
52+ ### 接口请求参数
53+ 接口函数传入的对象为[ ColoryrServer.SDK.HttpRequest] ( ../ColoryrServer/Core/SDK/HttpSDK.cs#L7 )
5454``` C#
5555public class HttpRequest
5656{
@@ -68,14 +68,14 @@ public class HttpRequest
6868 => Parameter .ContainsKey (arg ) ? Parameter [arg ] : null ;
6969}
7070```
71- ## 接口返回类型
71+ ### 接口返回类型
7272接口可以返回的类型可以是
7373- string
7474- Dictionary<string, object>
75- - [ ColoryrServer.SDK.HttpResponseString] ( ../ColoryrServer/Core/SDK/HttpSDK.cs )
76- - [ ColoryrServer.SDK.HttpResponseDictionary] ( ../ColoryrServer/Core/SDK/HttpSDK.cs )
77- - [ ColoryrServer.SDK.HttpResponseStream] ( ../ColoryrServer/Core/SDK/HttpSDK.cs )
78- - [ ColoryrServer.SDK.HttpResponseBytes] ( ../ColoryrServer/Core/SDK/HttpSDK.cs )
75+ - [ ColoryrServer.SDK.HttpResponseString] ( ../ColoryrServer/Core/SDK/HttpSDK.cs#L68 )
76+ - [ ColoryrServer.SDK.HttpResponseDictionary] ( ../ColoryrServer/Core/SDK/HttpSDK.cs#L90 )
77+ - [ ColoryrServer.SDK.HttpResponseStream] ( ../ColoryrServer/Core/SDK/HttpSDK.cs#L123 )
78+ - [ ColoryrServer.SDK.HttpResponseBytes] ( ../ColoryrServer/Core/SDK/HttpSDK.cs#L139 )
7979
8080其他返回类型均会报错
8181
You can’t perform that action at this time.
0 commit comments