Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Kap 14 posts 164 karma points
    21 days ago
    Kap
    0

    Reading Body from a ViewComponent

    Hi All,

    I am attempting to read the Body of a Request from within a View Component, but not having any luck.

    When I call GetRawBodyString() I get nothing. If I use the Body as an Input Stream and use a StreamReader to read it I get nothing. If I call Seek on the Body it throws an exception "method not supported"

    Does anyone have any ideas please?

    Thanks

    Kap

  • Kap 14 posts 164 karma points
    21 days ago
    Kap
    100

    Turns out the issue was that the POST request was using Forms encoded data, which does not appear to be return by the GetRawBody functions. Instead I used the ReadFormAsync method, which returned the correct data.

Please Sign in or register to post replies

Write your reply to:

Draft