@bufbuild/connect-web
Advanced tools
Comparing version 0.9.0 to 0.9.1
@@ -77,3 +77,3 @@ "use strict"; | ||
const response = await fetch(req.url, Object.assign(Object.assign({}, req.init), { headers: req.header, signal: req.signal, body })); | ||
const { isUnaryError, unaryError } = (0, protocol_connect_1.validateResponse)(method.kind, useBinaryFormat, response.status, response.headers); | ||
const { isUnaryError, unaryError } = (0, protocol_connect_1.validateResponse)(method.kind, response.status, response.headers); | ||
if (isUnaryError) { | ||
@@ -153,3 +153,3 @@ throw (0, protocol_connect_1.errorFromJson)((await response.json()), (0, connect_1.appendHeaders)(...(0, protocol_connect_1.trailerDemux)(response.headers)), unaryError); | ||
const fRes = await fetch(req.url, Object.assign(Object.assign({}, req.init), { headers: req.header, signal: req.signal, body: await createRequestBody(req.message) })); | ||
(0, protocol_connect_1.validateResponse)(method.kind, useBinaryFormat, fRes.status, fRes.headers); | ||
(0, protocol_connect_1.validateResponse)(method.kind, fRes.status, fRes.headers); | ||
if (fRes.body === null) { | ||
@@ -156,0 +156,0 @@ throw "missing response body"; |
@@ -72,3 +72,3 @@ "use strict"; | ||
const response = await fetch(req.url, Object.assign(Object.assign({}, req.init), { headers: req.header, signal: req.signal, body: (0, protocol_1.encodeEnvelope)(0, serialize(req.message)) })); | ||
(0, protocol_grpc_web_1.validateResponse)(useBinaryFormat, response.status, response.headers); | ||
(0, protocol_grpc_web_1.validateResponse)(response.status, response.headers); | ||
if (!response.body) { | ||
@@ -195,3 +195,3 @@ throw "missing response body"; | ||
const fRes = await fetch(req.url, Object.assign(Object.assign({}, req.init), { headers: req.header, signal: req.signal, body: await createRequestBody(req.message) })); | ||
const { foundStatus } = (0, protocol_grpc_web_1.validateResponse)(useBinaryFormat, fRes.status, fRes.headers); | ||
const { foundStatus } = (0, protocol_grpc_web_1.validateResponse)(fRes.status, fRes.headers); | ||
if (!fRes.body) { | ||
@@ -198,0 +198,0 @@ throw "missing response body"; |
@@ -74,3 +74,3 @@ // Copyright 2021-2023 Buf Technologies, Inc. | ||
const response = await fetch(req.url, Object.assign(Object.assign({}, req.init), { headers: req.header, signal: req.signal, body })); | ||
const { isUnaryError, unaryError } = validateResponse(method.kind, useBinaryFormat, response.status, response.headers); | ||
const { isUnaryError, unaryError } = validateResponse(method.kind, response.status, response.headers); | ||
if (isUnaryError) { | ||
@@ -150,3 +150,3 @@ throw errorFromJson((await response.json()), appendHeaders(...trailerDemux(response.headers)), unaryError); | ||
const fRes = await fetch(req.url, Object.assign(Object.assign({}, req.init), { headers: req.header, signal: req.signal, body: await createRequestBody(req.message) })); | ||
validateResponse(method.kind, useBinaryFormat, fRes.status, fRes.headers); | ||
validateResponse(method.kind, fRes.status, fRes.headers); | ||
if (fRes.body === null) { | ||
@@ -153,0 +153,0 @@ throw "missing response body"; |
@@ -69,3 +69,3 @@ // Copyright 2021-2023 Buf Technologies, Inc. | ||
const response = await fetch(req.url, Object.assign(Object.assign({}, req.init), { headers: req.header, signal: req.signal, body: encodeEnvelope(0, serialize(req.message)) })); | ||
validateResponse(useBinaryFormat, response.status, response.headers); | ||
validateResponse(response.status, response.headers); | ||
if (!response.body) { | ||
@@ -192,3 +192,3 @@ throw "missing response body"; | ||
const fRes = await fetch(req.url, Object.assign(Object.assign({}, req.init), { headers: req.header, signal: req.signal, body: await createRequestBody(req.message) })); | ||
const { foundStatus } = validateResponse(useBinaryFormat, fRes.status, fRes.headers); | ||
const { foundStatus } = validateResponse(fRes.status, fRes.headers); | ||
if (!fRes.body) { | ||
@@ -195,0 +195,0 @@ throw "missing response body"; |
{ | ||
"name": "@bufbuild/connect-web", | ||
"version": "0.9.0", | ||
"version": "0.9.1", | ||
"license": "Apache-2.0", | ||
@@ -26,3 +26,3 @@ "repository": { | ||
"dependencies": { | ||
"@bufbuild/connect": "0.9.0" | ||
"@bufbuild/connect": "0.9.1" | ||
}, | ||
@@ -29,0 +29,0 @@ "peerDependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
51208
+ Added@bufbuild/connect@0.9.1(transitive)
- Removed@bufbuild/connect@0.9.0(transitive)
Updated@bufbuild/connect@0.9.1