Documentation
¶
Index ¶
Constants ¶
View Source
const MethodGET = "GET"
Variables ¶
This section is empty.
Functions ¶
func BuildCurl ¶
func BuildCurl(resolved *CurlResolvedV2) (string, error)
BuildCurl assembles a curl command string from the resolved HTTP structure. This creates a curl command that represents the HTTP request.
func ExtractURLForTesting ¶
ExtractURLForTesting exposes extractURL for testing purposes
func GetFileContent ¶
func GetFileContent(resolved *CurlResolvedV2) (*mfile.File, *mhttp.HTTP)
GetFileContent returns both the file and HTTP content for easy processing
Types ¶
type ConvertCurlOptions ¶
type ConvertCurlOptions struct {
WorkspaceID idwrap.IDWrap
FolderID *idwrap.IDWrap
ParentHttpID *idwrap.IDWrap // For delta system support
IsDelta bool // Whether this is a delta variation
DeltaName *string // Optional delta name
Filename string // Optional filename (defaults to URL)
}
ConvertCurlOptions contains options for the curl conversion
type CurlResolvedV2 ¶
type CurlResolvedV2 struct {
// Primary HTTP request
HTTP mhttp.HTTP
// Associated data structures
SearchParams []mhttp.HTTPSearchParam
Headers []mhttp.HTTPHeader
BodyForms []mhttp.HTTPBodyForm
BodyUrlencoded []mhttp.HTTPBodyUrlencoded
BodyRaw *mhttp.HTTPBodyRaw
// File system integration
File mfile.File
}
CurlResolvedV2 contains the resolved HTTP request data using the new models
func ConvertCurl ¶
func ConvertCurl(curlStr string, opts ConvertCurlOptions) (*CurlResolvedV2, error)
ConvertCurl converts a curl command string to the new HTTP model structures
Click to show internal directories.
Click to hide internal directories.