Home / Function/ testDecodeJsonAttributeAsEmpty() — netty Function Reference

testDecodeJsonAttributeAsEmpty() — netty Function Reference

Architecture documentation for the testDecodeJsonAttributeAsEmpty() function in HttpPostStandardRequestDecoderTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  7f6e09c9_ed38_ec51_994a_8001760a3b51["testDecodeJsonAttributeAsEmpty()"]
  700bdd36_e58a_9cef_6fb4_774362c57167["HttpPostStandardRequestDecoderTest"]
  7f6e09c9_ed38_ec51_994a_8001760a3b51 -->|defined in| 700bdd36_e58a_9cef_6fb4_774362c57167
  style 7f6e09c9_ed38_ec51_994a_8001760a3b51 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http/src/test/java/io/netty/handler/codec/http/multipart/HttpPostStandardRequestDecoderTest.java lines 106–120

    @Test
    void testDecodeJsonAttributeAsEmpty() {
        String requestBody = "{\"iAm\": \" a JSON!\"}";

        HttpRequest request = new DefaultHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.POST, "/upload",
                headersFactory().newHeaders().add("Content-Type", "application/json"));

        HttpPostStandardRequestDecoder decoder = new HttpPostStandardRequestDecoder(httpDiskDataFactory(), request);
        ByteBuf buf = Unpooled.wrappedBuffer(requestBody.getBytes(CharsetUtil.UTF_8));
        DefaultHttpContent httpContent = new DefaultLastHttpContent(buf);
        decoder.offer(httpContent);

        assertEquals(0, decoder.getBodyHttpDatas().size());
        decoder.destroy();
    }

Domain

Subdomains

Frequently Asked Questions

What does testDecodeJsonAttributeAsEmpty() do?
testDecodeJsonAttributeAsEmpty() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/multipart/HttpPostStandardRequestDecoderTest.java.
Where is testDecodeJsonAttributeAsEmpty() defined?
testDecodeJsonAttributeAsEmpty() is defined in codec-http/src/test/java/io/netty/handler/codec/http/multipart/HttpPostStandardRequestDecoderTest.java at line 106.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free