Rolle :: Rest :: Client :: Auth :: Basic

Basisauthentifizierung für Rest Client Rolle
Jetzt downloaden

Rolle :: Rest :: Client :: Auth :: Basic Ranking & Zusammenfassung

Anzeige

  • Rating:
  • Lizenz:
  • Perl Artistic License
  • Preis:
  • FREE
  • Name des Herausgebers:
  • Kaare Rasmussen
  • Website des Verlags:
  • http://search.cpan.org/~kaare/

Rolle :: Rest :: Client :: Auth :: Basic Stichworte


Rolle :: Rest :: Client :: Auth :: Basic Beschreibung

Rolle :: Rest :: Client :: Auth :: Basic ist ein Perl-Modul, das Rolle :: REST :: client.just fügt, und alle Anrufe werden automatisch authentifiziert. Wenn Sie für einige Reale nicht authentifizieren möchten. Verwenden Sie Elch; mit 'Rolle :: Rest :: Client'; Mit 'Rolle :: Rest :: Client :: Auth :: Basic'; Sub Bar {MY ($ self) = @_; mein $ res = $ self-> post ('foo / bar / baz', {foo => 'bar'}); mein $ code = $ res-> code; meine $ data = $ res-> daten; Geben Sie $ Daten zurück, wenn $ Code == 200; }} My $ Foo = RESTEXAMPLE-> NEU (server => 'http: // localhost: 3000', type => 'application / json', user => 'mee', passwd => 'sekrit',); $ foo-> bar; # Controller SUB FOO: örtlich {mein ($ self, $ c) = @_; # Rufen Sie w / grundlegende Authentifizierung an, mein $ res = $ c-> modell ('mydata') -> post ('foo / bar / baz', {foo => 'bar'}); mein $ code = $ res-> code; meine $ data = $ res-> daten; ... # Rufen Sie w / o grundlegende Authentifizierung My $ res = $ c-> Modell ('mydata') -> Beitrag ('xyzzy', {foo => 'bar'}, {Authentifizierung => undef}); } Die Homepage des Produkts


Rolle :: Rest :: Client :: Auth :: Basic Zugehörige Software