GET | /Heartbeat/ |
---|
import 'package:servicestack/servicestack.dart';
class Response implements IConvertible
{
String? Code;
String? Message;
Response({this.Code,this.Message});
Response.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Code = json['Code'];
Message = json['Message'];
return this;
}
Map<String, dynamic> toJson() => {
'Code': Code,
'Message': Message
};
getTypeName() => "Response";
TypeContext? context = _ctx;
}
class HeartbeatResponse implements IConvertible
{
Response? ResponseStatus;
HeartbeatResponse({this.ResponseStatus});
HeartbeatResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'Response',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'Response',context!)
};
getTypeName() => "HeartbeatResponse";
TypeContext? context = _ctx;
}
class HeartbeatRequest implements IConvertible
{
HeartbeatRequest();
HeartbeatRequest.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "HeartbeatRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'webservices.mbukdatabase.co.uk', types: <String, TypeInfo> {
'Response': TypeInfo(TypeOf.Class, create:() => Response()),
'HeartbeatResponse': TypeInfo(TypeOf.Class, create:() => HeartbeatResponse()),
'HeartbeatRequest': TypeInfo(TypeOf.Class, create:() => HeartbeatRequest()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /Heartbeat/ HTTP/1.1 Host: webservices.mbukdatabase.co.uk Accept: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <HeartbeatResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/MBFSPreferences.ServiceModel"> <ResponseStatus> <Code>String</Code> <Message>String</Message> </ResponseStatus> </HeartbeatResponse>