jaguar_gzip 0.0.2 copy "jaguar_gzip: ^0.0.2" to clipboard
jaguar_gzip: ^0.0.2 copied to clipboard

outdatedDart 1 only

Gzip compressor interceptors for Jaguar

example/jaguar_gzip_example.dart

// Copyright (c) 2017, teja. All rights reserved. Use of this source code
// is governed by a BSD-style license that can be found in the LICENSE file.

import 'package:jaguar_gzip/jaguar_gzip.dart';
import 'package:jaguar/jaguar.dart';
import 'package:jaguar_reflect/jaguar_reflect.dart';
import 'package:jaguar_static_file/jaguar_static_file.dart';

@Api(path: '/api')
class ExampleApi {
  @WrapGzipStream()
  @WrapStaticFile()
  @Get(path: '/hello.txt')
  Response<JaguarFile> getHelloTxt() =>
      new Response<JaguarFile>(new JaguarFile('example/data/hello.txt'));
}

main() async {
  Configuration conf = new Configuration();
  conf.addApi(new JaguarReflected(new ExampleApi()));
  await serve(conf);
}
0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

Gzip compressor interceptors for Jaguar

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

jaguar

More

Packages that depend on jaguar_gzip