HTML Entities Encoder/Decoder API - Dart/Flutter Client
HTML Entities Encoder/Decoder converts special characters into safe HTML entities or restores encoded strings back to standard text. Pass any HTML markup or text snippet to receive the converted string, a replacement count, and a list of modified characters.
This is the Dart/Flutter client for the HTML Entities Encoder/Decoder API.
Installation
Add this to your pubspec.yaml:
dependencies:
apiverve_htmlentities: ^1.2.5
Then run:
dart pub get
# or for Flutter
flutter pub get
Usage
import 'package:apiverve_htmlentities/apiverve_htmlentities.dart';
void main() async {
final client = HtmlentitiesClient('YOUR_API_KEY');
try {
final response = await client.execute({
'html': '<div class="test">Hello & World</div>',
'action': 'encode'
});
print('Status: ${response.status}');
print('Data: ${response.data}');
} catch (e) {
print('Error: $e');
}
}
Response
{
"status": "ok",
"error": null,
"data": {
"action": "encode",
"original": "<div class=\"test\">Hello & World</div>",
"encoded": "<div class="test">Hello & World</div>",
"entities_replaced": [
"<",
"\"",
">",
"&",
"/"
],
"count": 8
}
}
API Reference
- API Home: HTML Entities Encoder/Decoder API
- Documentation: docs.apiverve.com/ref/htmlentities
Authentication
All requests require an API key. Get yours at apiverve.com.
License
MIT License - see LICENSE for details.
Built with Dart for APIVerve
Libraries
- apiverve_htmlentities
- HTML Entities Encoder/Decoder API client for Dart/Flutter