Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit 32d1d55

Browse files
Fix for #256
1 parent 971c157 commit 32d1d55

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/net/sprequestexecutorclient.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@ export class SPRequestExecutorClient implements HttpClientImpl {
6767
}
6868
}
6969

70-
return new Response(<any>spResponse.body, {
70+
// issue #256, Cannot have an empty string body when creating a Response with status 204
71+
var body = spResponse.statusCode === 204 ? null : spResponse.body;
72+
73+
return new Response(body, {
7174
headers: responseHeaders,
7275
status: spResponse.statusCode,
7376
statusText: spResponse.statusText,

0 commit comments

Comments
 (0)