Skip to content

Conversation

@ysknsid25
Copy link
Contributor

@ysknsid25 ysknsid25 commented Dec 6, 2025

resolves: #51

Test

node ./dist/cli.js request ./src/app.ts -P /image.png

app.ts

import { Hono } from 'hono'
import { readFile } from 'node:fs/promises'
import { join } from 'node:path'

const app = new Hono()

app.get('/image.png', async (c) => {
  try {
    const imagePath = join(process.cwd(), 'src', 'image.png')
    const imageData = await readFile(imagePath)
    return c.body(imageData.buffer, 200, {
      'Content-Type': 'image/png',
    })
  } catch (error) {
    console.error('Error serving image:', error)
    return c.text('Image not found', 404)
  }
})

export default app

use this png image

image

fix test

Signed-off-by: ysknsid25 <[email protected]>
@ysknsid25 ysknsid25 marked this pull request as draft December 6, 2025 07:39
@ysknsid25 ysknsid25 marked this pull request as ready for review December 6, 2025 07:39
fix function name `parsedResponseBody`

Signed-off-by: ysknsid25 <[email protected]>
fix README

Signed-off-by: ysknsid25 <[email protected]>
@ysknsid25 ysknsid25 marked this pull request as draft December 6, 2025 07:48
fix output format when direct`exclude`

Signed-off-by: ysknsid25 <[email protected]>
@ysknsid25 ysknsid25 marked this pull request as ready for review December 6, 2025 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve hono request output

2 participants