Skip to content

Option: auto judge content type by Data field type  #29

@wenchy

Description

@wenchy

See https://requests.readthedocs.io/en/latest/user/quickstart/#more-complicated-post-requests

We already supported form-data by providing Form option, much like the data in python requests. So
currently no "Content-Type" is auto injected. Just treat the Data as string body: d := fmt.Sprintf("%v", opts.Data).

  • string or fmt.Stringer
  • []byte

References

https://pkg.go.dev/fmt#Stringer

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions