httpfile

package
v1.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 5, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package httpfile imports ".http" files, the plain-text request format shared (with minor dialect differences) by the JetBrains HTTP Client and the VS Code REST Client extension, into Sonde request files. Every request of the input becomes one entry of a single output file; pre-request and response handler scripts are never executed, only kept as comments.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Import

func Import(stem string, data []byte, d syntax.Dialect, opts Options) (convert.Output, error)

Import converts one .http file's data into a convert.Output. stem names the single output file (the input's base name without its extension, or "requests" for stdin); d is the dialect of the generated files.

func StemFor

func StemFor(input string) string

StemFor derives the output file stem from an importer's INPUT argument: the base name without its extension, or "requests" for stdin ("-").

Types

type Options

type Options struct {
	// EnvFiles are --env-file paths: JetBrains http-client.env.json
	// documents, each naming one or more environments. A sibling
	// "*.private.env.json" next to an entry (the JetBrains convention) is
	// read too, when present; its values are never written, only their
	// names, as a secrets stub.
	EnvFiles []string
}

Options are the .http-specific import inputs, on top of the shared convert.Options.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL