Skip to content

Conversation

@wise-king-sullyman
Copy link
Contributor

@wise-king-sullyman wise-king-sullyman commented Oct 17, 2025

Closes #151

Assisted by Claude Code running claude-3-5-haiku and claude-sonnet

@wise-king-sullyman wise-king-sullyman marked this pull request as ready for review October 20, 2025 21:45
Copy link
Contributor

@dlabaj dlabaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few comments otherwise looks good.

if (!version) {
return new Response(
JSON.stringify({ error: 'Version parameter is required' }),
{ status: 400, headers: { 'Content-Type': 'application/json' } },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should create a helper function to generate the HTTP headers. Content-Type should also specify character encoding. Would set this to application/json; charset=utf-8

return new Response(
JSON.stringify({ error: 'Version parameter is required' }),
{ status: 400, headers: { 'Content-Type': 'application/json' } },
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the header we should also include the Content-Length, Date, and disable caching by setting Cache-Control to no-cache. I'm not sure about CORS, it's something we can probably skip right now while in development but may need to revisit later.

},
servers: [
{
url: '/text',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would change this to /api

@dlabaj dlabaj merged commit 3798460 into main Oct 21, 2025
3 checks passed
@github-actions
Copy link

🎉 This PR is included in version 1.15.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

wise-king-sullyman added a commit that referenced this pull request Nov 27, 2025
wise-king-sullyman added a commit that referenced this pull request Nov 27, 2025
Revert "feat(API): add text content API (#174)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add API support for text content

3 participants