GET | /MyInfo |
---|
import 'package:servicestack/servicestack.dart';
class MyInfo implements IConvertible
{
MyInfo();
MyInfo.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "MyInfo";
TypeContext? context = _ctx;
}
class UserInfo implements IConvertible
{
int? id;
String? userAuthId;
String? nickName;
String? firstName;
String? lastName;
String? email;
String? company;
String? phoneNumber;
String? addressLine1;
String? addressLine2;
String? addressCity;
String? addressZip;
String? addressState;
String? addressCountry;
UserInfo({this.id,this.userAuthId,this.nickName,this.firstName,this.lastName,this.email,this.company,this.phoneNumber,this.addressLine1,this.addressLine2,this.addressCity,this.addressZip,this.addressState,this.addressCountry});
UserInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
userAuthId = json['userAuthId'];
nickName = json['nickName'];
firstName = json['firstName'];
lastName = json['lastName'];
email = json['email'];
company = json['company'];
phoneNumber = json['phoneNumber'];
addressLine1 = json['addressLine1'];
addressLine2 = json['addressLine2'];
addressCity = json['addressCity'];
addressZip = json['addressZip'];
addressState = json['addressState'];
addressCountry = json['addressCountry'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'userAuthId': userAuthId,
'nickName': nickName,
'firstName': firstName,
'lastName': lastName,
'email': email,
'company': company,
'phoneNumber': phoneNumber,
'addressLine1': addressLine1,
'addressLine2': addressLine2,
'addressCity': addressCity,
'addressZip': addressZip,
'addressState': addressState,
'addressCountry': addressCountry
};
getTypeName() => "UserInfo";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'account.servicestack.net', types: <String, TypeInfo> {
'MyInfo': TypeInfo(TypeOf.Class, create:() => MyInfo()),
'UserInfo': TypeInfo(TypeOf.Class, create:() => UserInfo()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /MyInfo HTTP/1.1 Host: account.servicestack.net Accept: text/jsonl
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"id":0,"userAuthId":"String","nickName":"String","firstName":"String","lastName":"String","email":"String","company":"String","phoneNumber":"String","addressLine1":"String","addressLine2":"String","addressCity":"String","addressZip":"String","addressState":"String","addressCountry":"String"}