Skip to content

Use treesitter highlights on successful invocations of Hurl #7

@PriceHiller

Description

@PriceHiller

This issue is mostly to pitch an idea.

When Hurl successfully executes it returns the content from whatever API/webpage it was called against it returns the raw content. We can extract the Content-Type from Hurl by running it with the -i flag.

With the Content-Type in hand it should be possible to set the buffer's filetype to the output Content-Type. As a note Hurl returns the last http request's content and headers only, so if you had multiple GET or POST requests in a single file to different URLs, only the last request's content is returned.

If Hurl runs into an error then we can return the content in stderr as usual without any filetype settings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions