You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
708 B
Smarty
26 lines
708 B
Smarty
3 years ago
|
package com.xhb.logic.http.packet.{{.packet}};
|
||
|
|
||
|
import com.xhb.core.packet.HttpPacket;
|
||
|
import com.xhb.core.network.HttpRequestClient;
|
||
|
{{.imports}}
|
||
|
|
||
|
{{.doc}}
|
||
|
public class {{.packetName}} extends HttpPacket<{{.responseType}}> {
|
||
|
{{.paramsDeclaration}}
|
||
|
|
||
|
public {{.packetName}}({{.params}}{{if .HasRequestBody}}{{.requestType}} request{{end}}) {
|
||
|
{{if .HasRequestBody}}super(request);{{else}}super(EmptyRequest.instance);{{end}}
|
||
|
{{if .HasRequestBody}}this.request = request;{{end}}{{.paramsSetter}}
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public HttpRequestClient.Method requestMethod() {
|
||
|
return HttpRequestClient.Method.{{.method}};
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public String requestUri() {
|
||
|
return {{.uri}};
|
||
|
}
|
||
|
}
|