我希望wsse头像这样在flutter中生成https://doc.oroinc.com/api/authentication/wsse/
从未使用过这些API,但这里是默认Dart库的一般概念,我正在这里进行GET,根据您的需求进行更改
var g = await HttpClient().getUrl(url);
g.headers.set('Content-Type', 'application/vnd.api+json');
g.headers.set('Authorization', 'WSSE profile="$usernameToken"');
g.headers.set('X-WSSE', '''
UsernameToken Username="$admin",
PasswordDigest="$passworddigest",
Created="$date",
Nonce="$nonce"
''');
var r = await g.close();
//r is a stream
//read the response body as string
String body = await utf8.decodeStream(r);