wasm: Omit request body if it's empty (#1012)
This should allow creating GET and HEAD requests from http::Request
This commit is contained in:
		| @@ -44,6 +44,13 @@ impl Body { | ||||
|             inner: Inner::Multipart(f), | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     pub(crate) fn is_empty(&self) -> bool { | ||||
|         match &self.inner { | ||||
|             Inner::Bytes(bytes) => bytes.is_empty(), | ||||
|             Inner::Multipart(form) => form.is_empty(), | ||||
|         } | ||||
|     } | ||||
| } | ||||
|  | ||||
| impl From<Bytes> for Body { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user