banshee est en développement actif : les collecteurs vont encore changer, et une version que vous publiez demandera sans doute des ajustements. Pour un usage stable, attendez la version 1.0.0.

Examples

banshee/examples-collection/examples/protocols/

http-get-account

Example: http.get with user= and password=, an optional account in Basic.

  • example
  • protocol
  • http
  • account
  • basic

par banshee1 installation1 version

v1Dernière

Publiée le 27 octobre 2026. First version in this collection.

Protocol: http.get with an account

user= and password= send an account in Basic. Here the account is optional: one collector serves a page with an account and a page without.

How to read it

  • need('protocol:http:user', 'optional'): a standard variable of banshee, set in the tree, here optional. Unset, it reads ''.
  • An account is never sent by itself: the call names it, user=$user, password=$password. A user that reads '' sends no account, so the line needs no condition.
  • protocol:http:password is a secret: it goes into a call, never into a value or a message. Passed to value or fail, the validation refuses it; sent over http://, it stops the collector. Use https://.
  • The answer is not a secret: the password went in a header.

To adapt it

  • An API that wants a token instead: need('protocol:http:token') and headers=array('Authorization' => 'Bearer ' . $token).