tailieunhanh - Network Programming in .NET With C# and Visual Basic .NET phần 3

TXT, và nhấp vào nó, bạn sẽ thấy một mớ lộn xộn của các ký tự lạ, không phải là hình ảnh. Điều này là bởi vì Windows có chứa một ánh xạ từ tập tin mở rộng để loại tập tin, và JPG. TXT được ánh xạ tới tập tin khác nhau | HTTP 93 ------ Table HTTP response codes continued . HTTP response code range Meaning 400-499 Redirection Further action must be taken in order to complete the request. 500-599 Server error The server failed to fulfill an apparently valid request. Every HTTP response has a response code. In the above example the response code was 200. This number is followed by some human-readable text . OK . The response codes fall into five main categories shown in Table . MIME types Multipart Internet mail extensions MIME types are a means of describing the type of data such that another computer will know how to handle the data and how to display it effectively to the user. To illustrate the example if you changed the extension of a JPEG image .JPG to .TXT and clicked on it you would see a jumble of strange characters not the image. This is because Windows contains a mapping from file extension to file type and .JPG and .TXT are mapped to different file types image jpeg for .JPG and text plain for .TXT. To find an MIME type for a particular file such as .mp3 you can open the registry editor by clicking on Start Run then typing REGEDIT. Then click on HKEY_CLASSES_ROOT scroll down to .mp3 and the MIME type is written next to Content Type. Note Not all file types have a MIME type . .hlp help files . One of the most common uses of HTTP within applications is the ability to download the HTML content of a page into a string. The following application demonstrates this concept. It is certainly possible to implement HTTP at the socket level but there is a wealth of objects ready for use in HTTP client applications and it J Chapter 4 94 HTTP makes little sense to reinvent the wheel. The HTTP server in the next section is implemented using HTTPWebReqest. Start a new project in Visual Studio .NET and drag on two textboxes tbResult and tbUrl. TbResults should be set with multiline true. A button btnCapture should also be added. Click on the .

TỪ KHÓA LIÊN QUAN
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.