NetServices: Add support for Basic authentication
Change-Id: I304104f7096fd935212e1bfa3e988e7945cb5cec
This commit is contained in:
@@ -80,6 +80,12 @@ struct BHttpRedirectOptions {
|
||||
};
|
||||
|
||||
|
||||
struct BHttpAuthentication {
|
||||
BString username;
|
||||
BString password;
|
||||
};
|
||||
|
||||
|
||||
class BHttpRequest {
|
||||
public:
|
||||
// Constructors and Destructor
|
||||
@@ -95,12 +101,14 @@ public:
|
||||
|
||||
// Access
|
||||
bool IsEmpty() const noexcept;
|
||||
const BHttpAuthentication* Authentication() const noexcept;
|
||||
const BHttpFields& Fields() const noexcept;
|
||||
const BHttpMethod& Method() const noexcept;
|
||||
const BHttpRedirectOptions& Redirect() const noexcept;
|
||||
const BUrl& Url() const noexcept;
|
||||
|
||||
// Named Setters
|
||||
void SetAuthentication(const BHttpAuthentication& authentication);
|
||||
void SetFields(const BHttpFields& fields);
|
||||
void SetMethod(const BHttpMethod& method);
|
||||
void SetRedirect(const BHttpRedirectOptions& redirectOptions);
|
||||
|
||||
@@ -75,6 +75,9 @@ private:
|
||||
};
|
||||
|
||||
|
||||
BString encode_to_base64(const BString& string);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user