GET POST | /system/LiveBeat |
---|
import 'package:servicestack/servicestack.dart';
class LiveBeatRequest implements IConvertible
{
String? nameOfThread;
LiveBeatRequest({this.nameOfThread});
LiveBeatRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
nameOfThread = json['nameOfThread'];
return this;
}
Map<String, dynamic> toJson() => {
'nameOfThread': nameOfThread
};
getTypeName() => "LiveBeatRequest";
TypeContext? context = _ctx;
}
class LiveBeatResult implements IConvertible
{
DateTime? utcCachedLastBeat;
LiveBeatResult({this.utcCachedLastBeat});
LiveBeatResult.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
utcCachedLastBeat = JsonConverters.fromJson(json['utcCachedLastBeat'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'utcCachedLastBeat': JsonConverters.toJson(utcCachedLastBeat,'DateTime',context!)
};
getTypeName() => "LiveBeatResult";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'stubbur_autoupdates_live.smartnewapis.com', types: <String, TypeInfo> {
'LiveBeatRequest': TypeInfo(TypeOf.Class, create:() => LiveBeatRequest()),
'LiveBeatResult': TypeInfo(TypeOf.Class, create:() => LiveBeatResult()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /system/LiveBeat HTTP/1.1
Host: stubbur-autoupdates-live.smartnewapis.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"nameOfThread":"String"}
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"utcCachedLastBeat":"0001-01-01T00:00:00.0000000"}