how to get http status value?

2019-03-06 14:08发布

问题:

first of all i asked something before and i got another question please take a look this one first

I send some values to another url and about that

i made a question and got an answer, and finally i have another question if like i said that above question, i send some values to other url using spring and httpclient like this,

HttpClient client = HttpClientBuilder.create().build();
HttpPost post = new HttpPost("http://test.com");
post.setEntity(new UrlEncodedFormEntity(values arrayList));
(values arrayLists that i made is 
arrayList.add(new BasicNameValuePair("name","mister"));
HttpResponse response = client.execute(post);

if i send some value like that,how i get http status value at the receiving page, "http://test.com" if i assume that receiving page using spring and java how to code to get http status value?