| GET | /Vessels/Search |
|---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class VesselSearch implements IConvertible
{
String? Search;
VesselSearch({this.Search});
VesselSearch.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Search = json['Search'];
return this;
}
Map<String, dynamic> toJson() => {
'Search': Search
};
getTypeName() => "VesselSearch";
TypeContext? context = _ctx;
}
class VesselViewModel implements IConvertible
{
int? Id;
int? IMONumber;
String? MMSI;
String? Name;
VesselViewModel({this.Id,this.IMONumber,this.MMSI,this.Name});
VesselViewModel.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
IMONumber = json['IMONumber'];
MMSI = json['MMSI'];
Name = json['Name'];
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'IMONumber': IMONumber,
'MMSI': MMSI,
'Name': Name
};
getTypeName() => "VesselViewModel";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'internal.thebunkerbridge.com', types: <String, TypeInfo> {
'VesselSearch': TypeInfo(TypeOf.Class, create:() => VesselSearch()),
'VesselViewModel': TypeInfo(TypeOf.Class, create:() => VesselViewModel()),
});
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 /Vessels/Search HTTP/1.1 Host: internal.thebunkerbridge.com Accept: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <VesselViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Bridge.Core.ViewModels"> <IMONumber>0</IMONumber> <Id>0</Id> <MMSI>String</MMSI> <Name>String</Name> </VesselViewModel>