Skip to content

Commit acbc244

Browse files
authored
Merge pull request #45 from WebAssembly/fix-new-result
Make new request/response functions fallible
2 parents cc86a80 + 919b701 commit acbc244

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

proxy.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,7 @@ be used.</p>
855855
</ul>
856856
<h5>Return values</h5>
857857
<ul>
858-
<li><a name="new_outgoing_request.0"></a> <a href="#outgoing_request"><a href="#outgoing_request"><code>outgoing-request</code></a></a></li>
858+
<li><a name="new_outgoing_request.0"></a> result&lt;<a href="#outgoing_request"><a href="#outgoing_request"><code>outgoing-request</code></a></a>, <a href="#error"><a href="#error"><code>error</code></a></a>&gt;</li>
859859
</ul>
860860
<h4><a name="outgoing_request_write"><code>outgoing-request-write: func</code></a></h4>
861861
<h5>Params</h5>
@@ -926,7 +926,7 @@ be used.</p>
926926
</ul>
927927
<h5>Return values</h5>
928928
<ul>
929-
<li><a name="new_outgoing_response.0"></a> <a href="#outgoing_response"><a href="#outgoing_response"><code>outgoing-response</code></a></a></li>
929+
<li><a name="new_outgoing_response.0"></a> result&lt;<a href="#outgoing_response"><a href="#outgoing_response"><code>outgoing-response</code></a></a>, <a href="#error"><a href="#error"><code>error</code></a></a>&gt;</li>
930930
</ul>
931931
<h4><a name="outgoing_response_write"><code>outgoing-response-write: func</code></a></h4>
932932
<h5>Params</h5>

wit/types.wit

+2-2
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ interface types {
111111
scheme: option<scheme>,
112112
authority: option<string>,
113113
headers: headers
114-
) -> outgoing-request
114+
) -> result<outgoing-request, error>
115115
outgoing-request-write: func(request: outgoing-request) -> result<outgoing-stream>
116116

117117
// Additional optional parameters that can be set when making a request.
@@ -164,7 +164,7 @@ interface types {
164164
new-outgoing-response: func(
165165
status-code: status-code,
166166
headers: headers
167-
) -> outgoing-response
167+
) -> result<outgoing-response, error>
168168
outgoing-response-write: func(response: outgoing-response) -> result<outgoing-stream>
169169

170170
// The following block defines a special resource type used by the

0 commit comments

Comments
 (0)