IP/Port can now be changed before started.
RestVerbs added instead of Dictionary<string,string>
This commit is contained in:
parent
d824e71507
commit
f087ae5c83
2 changed files with 25 additions and 8 deletions
|
|
@ -203,7 +203,7 @@ namespace TShockAPI
|
|||
Log.ConsoleInfo("Backups " + (Backups.Interval > 0 ? "Enabled" : "Disabled"));
|
||||
|
||||
if (Initialized != null)
|
||||
Initialized();
|
||||
Initialized();
|
||||
|
||||
RestApi.Register(new RestCommand("/HelloWorld/name/{username}", usertest));
|
||||
}
|
||||
|
|
@ -237,7 +237,7 @@ namespace TShockAPI
|
|||
}
|
||||
|
||||
//http://127.0.0.1:8080/HelloWorld/name/{username}?type=status
|
||||
object usertest(Dictionary<string,string> verbs, IParameterCollection parameters, RequestEventArgs request)
|
||||
object usertest(RestVerbs verbs, IParameterCollection parameters, RequestEventArgs request)
|
||||
{
|
||||
var ret = new Dictionary<string, string>();
|
||||
var type = parameters["type"];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue