| GET | /{Workspace}/Weather/{Lat}/{Lon} |
|---|
import 'package:servicestack/servicestack.dart';
class WeatherRequest implements IConvertible
{
String? Workspace;
String? Lat;
String? Lon;
WeatherRequest({this.Workspace,this.Lat,this.Lon});
WeatherRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Workspace = json['Workspace'];
Lat = json['Lat'];
Lon = json['Lon'];
return this;
}
Map<String, dynamic> toJson() => {
'Workspace': Workspace,
'Lat': Lat,
'Lon': Lon
};
getTypeName() => "WeatherRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'dev.fieldsquared.com', types: <String, TypeInfo> {
'WeatherRequest': TypeInfo(TypeOf.Class, create:() => WeatherRequest()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /{Workspace}/Weather/{Lat}/{Lon} HTTP/1.1
Host: dev.fieldsquared.com
Accept: text/jsv