| GET | /PublicIp |
|---|
import 'package:servicestack/servicestack.dart';
class PublicIp implements IConvertible
{
String? ip;
String? remote_addr;
String? forwarded_for;
String? client_ip;
PublicIp({this.ip,this.remote_addr,this.forwarded_for,this.client_ip});
PublicIp.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ip = json['ip'];
remote_addr = json['remote_addr'];
forwarded_for = json['forwarded_for'];
client_ip = json['client_ip'];
return this;
}
Map<String, dynamic> toJson() => {
'ip': ip,
'remote_addr': remote_addr,
'forwarded_for': forwarded_for,
'client_ip': client_ip
};
getTypeName() => "PublicIp";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'dev.fieldsquared.com', types: <String, TypeInfo> {
'PublicIp': TypeInfo(TypeOf.Class, create:() => PublicIp()),
});
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 /PublicIp HTTP/1.1 Host: dev.fieldsquared.com Accept: application/xml