Skip to content

Missing ObjectContent class in System.Net.Http #16538

@chadly

Description

@chadly

It appears ObjectContent didn't make it among the various subclasses of HttpContent (StreamContent, StringContent, etc.). Is this a bug or is there another way to use HttpClient to POST json somewhere?

e.g.

var value = new MyType();
client.PostAsync("http://example.com/", new ObjectContent<MyType>(value, new JsonMediaTypeFormatter()))

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions