Ballerina API Documentation

Functions of org.ballerinalang.connectors.basicauth package

function constructBasicAuthHeader(message request, string encodedBasicAuthValue, string userName, string password) (string )

Parameters:

Parameter NameData TypeDescription
requestmessage
encodedBasicAuthValuestring
userNamestring
passwordstring

Return Parameters:

Return VariableData TypeDescription
string


Connectors of org.ballerinalang.connectors.basicauth package

connector ClientConnector (string baseUrl, string userName, string password)

Basic Auth client connector

Parameters:

Parameter NameData TypeDescription
baseUrlstringThe endpoint base url
userNamestringThe user name of the account
passwordstringThe password of the account

Actions:

action get()

Get with basic authentication

Parameters:

Parameter NameData TypeDescription
clientConnectorClientConnectorpath: The endpoint path
pathstringThe endpoint path
requestmessageThe request of the method

Return Parameters:

Return VariableData TypeDescription
messageresponse object

action post()

Post with basic authentication

Parameters:

Parameter NameData TypeDescription
clientConnectorClientConnectorpath: The endpoint path
pathstringThe endpoint path
requestmessageThe request of the method

Return Parameters:

Return VariableData TypeDescription
messageresponse object

action put()

Put with basic authentication

Parameters:

Parameter NameData TypeDescription
clientConnectorClientConnectorpath: The endpoint path
pathstringThe endpoint path
requestmessageThe request of the method

Return Parameters:

Return VariableData TypeDescription
messageresponse object

action delete()

Delete with basic authentication

Parameters:

Parameter NameData TypeDescription
clientConnectorClientConnectorpath: The endpoint path
pathstringThe endpoint path
requestmessageThe request of the method

Return Parameters:

Return VariableData TypeDescription
messageresponse object


Menu

  • Functions
    • constructBasicAuthHeader(message request, string encodedBasicAuthValue, string userName, string password) (string )
  • Connectors
    • ClientConnector (string baseUrl, string userName, string password)
      • get(ClientConnector clientConnector, string path, message request)
      • post(ClientConnector clientConnector, string path, message request)
      • put(ClientConnector clientConnector, string path, message request)
      • delete(ClientConnector clientConnector, string path, message request)

Copyright 2017 Ballerina API Documentation