refit icon indicating copy to clipboard operation
refit copied to clipboard

[Bug]: Body is null when function is hosted in Azure Isolated Worker

Open JSCProjects opened this issue 3 years ago • 1 comments

Describe the bug 🐞

We are hosting some http functions in our Azure Isolated Worker and if we only add the Body attribute to our interface method. f.e.

public interface IClient
{
  [Post("/do-something/{id}")]
  Task<IApiResponse> DoSomething(string id, [Body] PostData data);  
}

The HttpRequestData.Body is always null. The only way we get it working is to add buffered: true. f.e.

public interface IClient
{
  [Post("/do-something/{id}")]
  Task<IApiResponse> DoSomething(string id, [Body(buffered: true)] PostData data);  
}

I've also seen this bug and maybe it's related.

Thanx in advance.

Greetz,

Joey Chömpff

Step to reproduce

follow description

Reproduction repository

https://github.com/reactiveui/ReactiveUI

Expected behavior

HttpRequestData.Body shouldn't be null

Screenshots 🖼️

No response

IDE

Rider Windows

Operating system

windows

Version

No response

Device

No response

ReactiveUI Version

6.3.2

Additional information ℹ️

No response

JSCProjects avatar Dec 09 '22 08:12 JSCProjects

Add buffered: true does the trick for me in interface.

rdyhalt avatar Aug 11 '23 09:08 rdyhalt