@manhng

Welcome to my blog!

WebRequest POST C#

May 11, 2020 20:46

WebRequest POST C# (edit)

HTTP Status Code

https://viblo.asia/p/tim-hieu-ve-http-status-code-lA7GKwx5GKZQ

https://topdev.vn/blog/tim-hieu-ve-http-status-code/

https://kinsta.com/blog/http-status-codes/

https://developer.mozilla.org/en-US/docs/Web/HTTP/Status

What does the 404 not found error mean?

https://www.ionos.com/digitalguide/websites/website-creation/what-does-the-404-not-found-error-mean/

How may ways to POST ?

https://medium.com/@rajajawahar77/content-type-x-www-form-urlencoded-form-data-and-json-e17c15926c69

  1. application/ x-www-form-urlencoded
  2. multipart/form-data
  3. application/json

https://docs.microsoft.com/en-us/dotnet/framework/network-programming/how-to-send-data-using-the-webrequest-class

https://docs.microsoft.com/vi-vn/dotnet/framework/network-programming/how-to-request-data-using-the-webrequest-class

How to add parameters into a WebRequest? (HAY)

https://stackoverflow.com/questions/3279888/how-to-add-parameters-into-a-webrequest

How to make an HTTP POST web request

https://stackoverflow.com/questions/4015324/how-to-make-an-http-post-web-request

How can I post data using HttpWebRequest?

https://stackoverflow.com/questions/39246236/how-can-i-post-data-using-httpwebrequest

How to post JSON to a server using C#?

https://stackoverflow.com/questions/9145667/how-to-post-json-to-a-server-using-c

Multipart FormData (Input Type = File)

https://briangrinstead.com/blog/multipart-form-post-in-c/

Others

https://www.c-sharpcorner.com/UploadFile/dacca2/http-request-methods-get-post-put-and-delete/ (Web API)

https://crystalnet-tech.com/RuntimeLibrary/Help/html/scr/How_to__Send_Data_Using_the_WebRequest_Class.html

https://developer.yahoo.com/dotnet/howto-rest_cs.html/

https://stickler.de/informationen/code-snippets/httpwebrequest-mit-post-daten

https://codesamplez.com/programming/http-request-c-sharp

https://pastebin.com/bzWczKXc

https://riptutorial.com/dot-net/example/87/sending-a-post-request-with-a-string-payload-using-system-net-httpwebrequest

SSL/TLS Secure Channel

https://stackoverflow.com/questions/11222759/error-c-sharp-the-underlying-connection-was-closed-could-not-establish-trust-r

https://codeshare.co.uk/blog/how-to-force-a-net-website-to-use-tls-12/

https://stackoverflow.com/questions/47269609/system-net-securityprotocoltype-tls12-definition-not-found

Issues with SSL/TLS

// TRY THIS 1

ServicePointManager
.SecurityProtocol = SecurityProtocolType.Tls12;

// TRY THIS 2
if (ServicePointManager.SecurityProtocol.HasFlag(SecurityProtocolType.Tls12) == false) { ServicePointManager.SecurityProtocol = ServicePointManager.SecurityProtocol | SecurityProtocolType.Tls12; }

// TRY THIS 3

System.Net.ServicePointManager.ServerCertificateValidationCallback = new System.Net.Security.RemoteCertificateValidationCallback(delegate { return true; });
System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls | System.Net.SecurityProtocolType.Tls11 | System.Net.SecurityProtocolType.Tls12;

Security Protocol (.NET 4.5)

https://stackoverflow.com/questions/28286086/default-securityprotocol-in-net-4-5

https://support.microsoft.com/en-us/help/3154518/support-for-tls-system-default-versions-included-in-the-net-framework

https://support.microsoft.com/en-us/help/3154520/support-for-tls-system-default-versions-included-in-the-net-framework

https://blogs.perficient.com/2016/04/28/tsl-1-2-and-net-support/

Security Protocol (.NET Core)

https://docs.microsoft.com/en-us/dotnet/api/system.net.servicepointmanager.securityprotocol?view=netcore-2.1

Categories

Recent posts