Skip to content

Add support for JSON and HTML input for tone() method #217

@jeffpk62

Description

@jeffpk62

The tone() method of tone_analyzer_v3.py assumes that input will be a plain text string. But the service also accepts JSON and HTML input. Add a content_type parameter with a default of text/plain to preserve the current default functionality; also maintain the assignment of the plain text to JSON to preserve the current functionality. But now allow application/json and text/html to be passed to the method, as well. Adds a number of examples to demonstrate the new functionality.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions