Skip to content

Commit 373ad08

Browse files
committed
Set ExpectCompute based on the length of the payload
1 parent c40e0a7 commit 373ad08

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/BizHawk.Client.Common/Api/HttpCommunication.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,14 @@ public string ExecPostAsForm(string url = null, string payload = "")
6565
}
6666
#pragma warning restore DOC105
6767

68-
public string ExecPostRaw(string url = null, string payload = "", string contentType = "text/plain") => Post(
69-
url ?? PostUrl,
70-
new StringContent(payload, Encoding.UTF8, contentType)
71-
).Result;
68+
public string ExecPostRaw(string url = null, string payload = "", string contentType = "text/plain")
69+
{
70+
return Post(
71+
url ?? PostUrl,
72+
new StringContent(payload, Encoding.UTF8, contentType),
73+
payload.Length > ExpectContinueThreshold
74+
).Result;
75+
}
7276

7377
public async Task<string> Get(string url)
7478
{

0 commit comments

Comments
 (0)