how to get http status value?

风流意气都作罢 提交于 2019-12-02 14:32:46

问题


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?

来源:https://stackoverflow.com/questions/43464321/how-to-get-http-status-value

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!