Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Support binding text/plain request body to action string args #5137

Closed
DamianEdwards opened this issue Aug 12, 2016 · 1 comment
Closed

Support binding text/plain request body to action string args #5137

DamianEdwards opened this issue Aug 12, 2016 · 1 comment

Comments

@DamianEdwards
Copy link
Member

So one can easily post "text/plain" content and get it in an action method with a string arg, e.g.

// POST /string-post HTTP/1.1
// Content-Type: text/plain
// Hello, World!
[HttpPost("string-post")]
public IActionResult StringPost(string payload)
{
    // payload contains "Hello, World!"
    ...
}
@kichalla
Copy link
Member

Added a sample to Entropy aspnet/Entropy@7a4ca4b

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants