We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
复现场景 (两种设置response方式均会卡住,没有响应值)
@Test public void testHeaders() throws Exception { HttpServer server = httpServer(12306); server.response(header("content-type", "application/json"), header("content-length", "100")); //server.response(header("content-type", "application/json")).response(header("content-length", "100")); running(server, () -> { Request request = Request.Post("http://localhost:12306/"); HttpResponse response = request.execute().returnResponse(); System.out.print("response:" + response + "\n"); List<String> contentTypeValues = HttpResponseUtils.getHeader(response, "content-type"); List<String> contentLengthValues = HttpResponseUtils.getHeader(response, "content-length"); System.out.print(contentLengthValues); System.out.print(contentTypeValues); assertEquals("application/json", contentTypeValues.get(0)); assertEquals("100", contentTypeValues.get(0)); }); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
复现场景 (两种设置response方式均会卡住,没有响应值)
The text was updated successfully, but these errors were encountered: