[英]How to make http get request\response to site?
I am new at web development, so how to make http request\\respone for some site ( http://google.com )我是网络开发的新手,所以如何为某些网站( http://google.com )发出 http 请求\\响应
Thank you!谢谢!
PS聚苯乙烯
I mean, that when my SomeController activated- i want send http request to another site,get data from it and send it into View我的意思是,当我的 SomeController 激活时-我想将 http 请求发送到另一个站点,从中获取数据并将其发送到 View
A client (browser) submits HTTP request to the server;客户端(浏览器)向服务器提交 HTTP 请求; then the server returns a response to the client.
然后服务器向客户端返回响应。 The response contains status information about the request and also contains the requested content.
响应包含有关请求的状态信息,还包含请求的内容。 GET - requests data from a specified resource, http://google.com - you type this url in browser and hit the enter key, it's a get request and you see a page, that the response.
GET - 从指定资源http://google.com请求数据 - 您在浏览器中输入此 url 并按回车键,这是一个获取请求,您会看到一个页面,即响应。
Click here for details.单击此处了解详细信息。
Use HttpClient to connect a site from your mvc controller, click here for details.使用 HttpClient 从您的 mvc 控制器连接站点,单击此处了解详细信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.