<back to all web services

AddExternalCacheRequest

The following routes are available for this service:
POST/RestApi/cache//add
import 'package:servicestack/servicestack.dart';

class AddExternalCacheRequest implements IConvertible
{
    String? Url;
    String? CacheKey;
    List<String>? Keys;

    AddExternalCacheRequest({this.Url,this.CacheKey,this.Keys});
    AddExternalCacheRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Url = json['Url'];
        CacheKey = json['CacheKey'];
        Keys = JsonConverters.fromJson(json['Keys'],'List<String>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Url': Url,
        'CacheKey': CacheKey,
        'Keys': JsonConverters.toJson(Keys,'List<String>',context!)
    };

    getTypeName() => "AddExternalCacheRequest";
    TypeContext? context = _ctx;
}

class AddExternalCacheResponse implements IConvertible
{
    bool? Result;
    String? Message;

    AddExternalCacheResponse({this.Result,this.Message});
    AddExternalCacheResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Result = json['Result'];
        Message = json['Message'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Result': Result,
        'Message': Message
    };

    getTypeName() => "AddExternalCacheResponse";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'www.asg.com.au', types: <String, TypeInfo> {
    'AddExternalCacheRequest': TypeInfo(TypeOf.Class, create:() => AddExternalCacheRequest()),
    'AddExternalCacheResponse': TypeInfo(TypeOf.Class, create:() => AddExternalCacheResponse()),
});

Dart AddExternalCacheRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /RestApi/cache//add HTTP/1.1 
Host: www.asg.com.au 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	Url: String,
	CacheKey: String,
	Keys: 
	[
		String
	]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Result: False,
	Message: String
}