Skip to content

Error while parsing an empty response #798

@TheBlackArroVV

Description

@TheBlackArroVV

If I have an API, which returns an empty response, for example, with 204 if I try to parse it, it will fail with Unknown MIME type. Is it expected?

I believe Net::HTTP gonna process it to empty hash.

Code to reproduce:

require "http"
response = HTTP.get("https://httpbin.org/status/204")
response.parse

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions