Skip to content

JObject Usage for Multipart Form Data #63

@houstonhaynes

Description

@houstonhaynes

Hawaii generates Newtonsoft.Json.Linq.JObject for multipart form data request bodies, but this doesn't serialize correctly for multipart/form-data content type.

CloudflareFS Workaround

Post-processing script (post-process-jobject.fsx) that converts JObject to string for multipart endpoints:

// Detect multipart endpoints
let isMultipartOperation (line: string) =
    line.Contains("multipart/form-data")

// Replace JObject with string
let replaceJobjectWithString (content: string) =
    content.Replace(
        "body: Newtonsoft.Json.Linq.JObject",
        "body: string")

Recommendation

This is related to existing issue #55. CloudflareFS workaround could inform the fix. But since I updated to .NET 8 and FSharp.SystemTextJson I'm not sure if my fix would apply.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions