public static HttpMalformedRequestDefinition fromNode(Node node) {
        HttpMalformedRequestDefinition.Builder builder = builder();
        ObjectNode o = node.expectObjectNode();
        o.getStringMember(BODY).map(StringNode::getValue).ifPresent(builder::body);
        o.getStringMember(BODY_MEDIA_TYPE).map(StringNode::getValue).ifPresent(builder::bodyMediaType);
        o.getObjectMember(HEADERS).ifPresent(headers -> {
            headers.getStringMap().forEach((k, v) -> {
                builder.putHeader(k, v.expectStringNode().getValue());
            });
        });
        o.getStringMember(HOST).ifPresent(stringNode -> builder.host(stringNode.getValue()));
        builder.method(o.expectStringMember(METHOD).getValue());
        o.getStringMember(URI).map(StringNode::getValue).ifPresent(builder::uri);
        o.getArrayMember(QUERY_PARAMS).ifPresent(queryParams -> {
            builder.queryParams(queryParams.getElementsAs(StringNode::getValue));
        });
        return builder.build();
    }
Defines a request to be used by an HttpMalformedRequest test case.
smithy-protocol-test-traits/src/main/java/software/amazon/smithy/protocoltests/traits/HttpMalformedRequestDefinition.java