getPublicNoteWithHttpInfo method
Fetch a publicly shared note.
Unauthenticated. The share token is the credential. For password-protected notes the password is supplied via the ?password= query param; the response distinguishes "no password supplied" from "wrong password" so the viewer can render the right prompt. Unknown tokens and disabled-share notes both return 404 to prevent token enumeration.
Note: This method returns the HTTP Response.
Parameters:
Implementation
Future<Response> getPublicNoteWithHttpInfo(String token, { String? password, }) async {
// ignore: prefer_const_declarations
final path = r'/public/notes/{token}'
.replaceAll('{token}', token);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (password != null) {
queryParams.addAll(_queryParams('', 'password', password));
}
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}