Rol :: Rest :: Klant :: Auth :: Basic

Basisverificatie voor REST-clientrol
Download nu

Rol :: Rest :: Klant :: Auth :: Basic Rangschikking & Samenvatting

Advertentie

  • Rating:
  • Vergunning:
  • Perl Artistic License
  • Prijs:
  • FREE
  • Naam uitgever:
  • Kaare Rasmussen
  • Uitgever website:
  • http://search.cpan.org/~kaare/

Rol :: Rest :: Klant :: Auth :: Basic Tags


Rol :: Rest :: Klant :: Auth :: Basic Beschrijving

Rol :: Rest :: Client :: Auth :: Basic is een PERL-module die basisverificatie aan rolt :: REST :: client.just voeg deze toe aan uw klasse en alle oproepen zullen automatisch authenticeren. Een authenticatie-parameter automatisch Als u voor sommige reaon niet wilt authenticeren.Synopsis {Packing RestEXample; gebruik eland; Met 'Rol :: Rest :: Client'; Met 'Rol :: Rest :: Client :: Auth :: Basic'; Subbar {mijn ($ self) = @_; mijn $ res = $ self-> post ('foo / bar / baz', {foo => 'bar'}); mijn $ CODE = $ RES-> CODE; My $ Data = $ RES-> Gegevens; Retourneer $ gegevens als $ Code == 200; }} Mijn $ FOO = RESTEXAMPLE-> NIEUW (Server => 'http: // localhost: 3000', Type => 'Toepassing / JSON', Gebruiker => 'Mee', Passwd => 'Sekrit',); $ foo-> bar; # controller sub foo: local {my ($ self, $ c) = @_; # Bel W / Basic Authentication My $ Res = $ C-> Model ('MyData') -> Post ('foo / bar / baz', {foo => 'bar'}); mijn $ CODE = $ RES-> CODE; My $ Data = $ RES-> Gegevens; ... # Bel W / O Basic Authentication My $ Res = $ C-> Model ('MyData') -> Post ('xyzzy', {foo => 'bar'}, {authenticatie => undef}); } Homepage van het product


Rol :: Rest :: Klant :: Auth :: Basic Gerelateerde software