Click here to Skip to main content
15,888,080 members
Everything / HTTP

HTTP

HTTP

Great Reads

by honey the codewitch
Explore an Arduino based IoT web server and UDP multicaster for monitoring a remote water pump
by Michael Haephrati
A simple way for sending WhatsApp messages to an individual or to a group in C++
by Max R McCarty
OWASP's #6 most vulnerable security risk has to do with keeping secrets secret.
by Ivan Yakimov
The article contains comparison of pure HttpClient with RestSharp and Refit.

Latest Articles

by honey the codewitch
Scraping the web is easy with Visual FA. Here's an example of how.
by Jason Sultana
Understanding and preventing Newline Injection
by Ivan Yakimov
The article contains comparison of pure HttpClient with RestSharp and Refit.
by ToughDev
How to fix PlatformNotSupportedException when running WCF apps

All Articles

Sort by Updated

HTTP 

N 20 Apr 2024 by honey the codewitch
Scraping the web is easy with Visual FA. Here's an example of how.
11 Mar 2024 by Graeme_Grant
There are tools to help you convert raw JSON into C# classes. One of my go-to tools is JSON Utils: Generate C#, VB.Net, SQL Table and Java from JSON[^]. I list more in my articles: >Working with Newtonsoft.Json in C# & VB[^] & Working with...
11 Mar 2024 by Martin Carpenter
I'm trying to process JSON data that I've retrieved from a Web API. HttpResponseMessage response = await client.PostAsJsonAsync( "api/my_report", report_request); response.EnsureSuccessStatusCode(); var content = await...
3 Mar 2024 by Jason Sultana
Understanding and preventing Newline Injection
8 Jan 2024 by Pete O'Hanlon
Just spitballing, but something like this should be possible.private HttpClient httpClient; public async Task DownloadImageAndSaveAsync(string sourceFile, string outputFolder, string outputFileName) { try { using Stream fileStream = await...
8 Jan 2024 by OriginalGriff
Here's how I do it: WebClient wc = new WebClient(); outPath = Path.Combine(KnownFolders.Downloads.Path, $"{imageFileName}.{imageFileExtension}"); wc.DownloadFile(imageUrl,...
8 Jan 2024 by Leonard Salamacha 2023
I have been trying to get the image from a url then writing the image to disk with no success. Can anyone help with this? Example URL is: https://static.tvmaze.com/uploads/images/medium_portrait/244/610854.jpg Current code is: try {...
7 Nov 2023 by Richard Deeming
IIRC, the X-Powered-By header is added if ASP.NET is installed on the server; it doesn't tell you that the current page was actually generated by ASP.NET. I don't think there's any realy way you can tell from the outside whether this is a...
7 Nov 2023 by DerekT-P
I'm evaluating a 3rd party website for a client. All the pages end in a .ASP extension (which I'm familiar with from the old days of Classic ASP). The response headers include a "X-Powered-By" value of ASP.Net, and the page content doesn't...
1 Nov 2023 by Ivan Yakimov
The article contains comparison of pure HttpClient with RestSharp and Refit.
29 Jan 2023 by kk2014
Hi All suppose i have two sites are https://test.com and http://test.com. Earlier, my files were on http://test.com (non-secure) now i have migrated them on https://test.com (secure). So now there are no files on http://test.com (non-secure). ...
11 Dec 2022 by CodeGuru84
To create a custom HTTP response in ASP.NET Core, you can use the ObjectResult class. The ObjectResult class allows you to return a custom object as the response from a controller action. Here's an example of how you might use the ObjectResult...
11 Dec 2022 by AzeeM_R
1 Hi I want to create middleware for Asp.net core to wrap http response that returns response like below { { "count":1,"timestamp":"2021-12-18T01:13:41.2985038+05:00", "status":"Success", "results":[ {...
6 Dec 2022 by Juan Casas Dec2022
The goal is to migrate code that makes a post request. The code being migrated comes from Zapier. The code is being migrated to a nestjs app. Zapier uses vanilla javascript. the code used in zapier that makes a request is the following:: ...
25 Nov 2022 by Peter Leow
Beginner's Guide to HTTP
20 Oct 2022 by enamul haque
In "bb" variable all data show in json format when i debugged. but show this error "HTTP Error 400. The request hostname is invalid". This json data is working in Postman Please Help!!!! What I have tried: void send() async { var...
12 Sep 2022 by Han Bo Sun
How to stream a large file and support byte range seeking using Spring Boot
24 Mar 2022 by dk_the_developer
Step by step guide to consuming the Rest API endpoints using Python programming
18 Mar 2022 by Ahiri
Hi,I want to pass the byte array into insert query but I am not using the parameter. I am directly passing values into insert query.I am getting the following error:at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response,...
21 Feb 2022 by Sam_k_khan
i want to send the req object as whole in another request e.g axios and process the req object in api rather than inside route that will be some where else. here is my route code app.post("/adddata", async (req, res) => { const result =...
25 Jan 2022 by expertvision
I'm building a Windows application that will connect to a website using private proxies and do stuff on that site. I want to use the new HTTPClient to do that. I have the next scenario for the login part: I GET the login page. The login page...
7 Jan 2022 by Eltontom
I'm not familiar with Complex HTTPWebRequest but, Is your Cookie File Name supposed to have a Forward Slash "/" or a Back Slash "\"?? "Dim filename As String = "d:/" & "cookie.dat"
7 Jan 2022 by sabin 2021
I am trying to send a restsharp post request thru a proxy server, but I cant figure out how to. What I have tried: I have tried this but it didnt workvar client = new RestClient("http://example.com") client.Proxy = new...
21 Dec 2021 by AzeeM_R
I have http response wrapper that rewrite response and suppose to send response like below {"Version":"1.0.0.0","StatusCode":200,"Message":"Success","Result":[{"code":"465","name":"fasdfsdfsd","systemkey":"AAAAAACL","createdby":"RM ...
6 Dec 2021 by Michael Sydney Balloni
Interested in easily implementing REST communications in your Windows C++ apps?
13 Oct 2021 by Alexander Angelopoulos
public string Execute(string url, DataSet dsItem) { using (HttpClient client = new HttpClient()) { client.BaseAddress = new Uri(url); ...
10 Oct 2021 by Priyanshu Sharma 2021
function getcartdata($acctoken) { $url = "https://api.us-central1.gcp.commercetools.com/demo-commerce/carts/8d9e4d12-2a5f-4bd4-a4af-97d2bd9b320c"; $requestmethod = "GET"; $cartdata = getRequest($url, $requestmethod,$acctoken); return...
5 Sep 2021 by Member 15348209
The following three containers are managed in docker-compose. 'docker-compose up' solves all 3 containers with no errors, and my application works properly when 'docker swag flag -f' is called. I followed these instructions to set up and edit the...
26 Jul 2021 by stijn de Decker
hi, I am trying to put i a file on a sharepoint drive with MS GRAPH. it works for text files but other files get changed - result file corrupt its with a FMIS program, i only have some sort of lowcode i can use when i check the data of the...
13 Jul 2021 by Member 13702159
I have HTTP client: OkHttpClient client = new OkHttpClient.Builder() .connectTimeout(55, TimeUnit.MINUTES) // connect timeout .writeTimeout(55, TimeUnit.MINUTES) // write timeout .readTimeout(55,...
23 Jun 2021 by Manidas Payyoli
I have two API created in .net core 3.1 (lets say api A & api B) api A will call api B and merging 2 out put.But when call, I am getting :"Error:: Exception has been thrown by the target of an invocation.: Error Executing C# Script" so as I said...
15 Jun 2021 by Azad R Chouhan
Hello everyone I am posting the same question again. Because i did not get any reply from my previous question.I am working on an application. Its a window application which developed in .net 2.0Now the problem is this that when ever i run my application and i send a request to another...
1 Jun 2021 by Ben Zimmer
So this is the popup that I'm referencing: https://i.stack.imgur.com/w0Abz.png Everything is working completely fine except this one pop up which I can’t bypass. Here is the code I'm using to connect to the url public void...
24 May 2021 by Member 13128846
i'm trying to send(POST) multiple(2or3) variables using http.POST.http.POST(variable1,variable2) something like this, but unable to do so. can anyone please help me in doing this? What I have tried: i used & between tow variable in a single...
17 May 2021 by Manidas Payyoli
Hi i have a function which will check given project name is include in the json object. For that I am not getting a proper json object in my response how to do that? this is my object ...
17 May 2021 by raddevus
You didn't tell us what the actual error is: Is the for loop ever entered? Or, does it cause an error when the for loop is entered? I'm going to guess that the for loop is never entered. That means the JSONObj.length is probably 0. Most...
14 May 2021 by Member 13128846
I am trying to use http.begin() method in HTTPClient Library to program esp32 cam. i have an api that uses for sendein sms that works fine in http.begin(myApiAddress) and also i can use myApiAddress in an address bar a browser like google chrome...
20 Mar 2021 by User 15073331
I am building a scripted API which allows users to log in to dating social media. Upon visiting the following link: https://badoo.com/signin/?f=top First HTTP XHR POST request you will get is: https://badoo.com/webapi.phtml?SERVER_APP_STARTUP ...
3 Mar 2021 by Member 14649480
Hi, I have developed a c# dll that makes http reqest using System.Net namespace. If I call the dll methods from an c# programm everything workes fine but i need to use this dll from native c++ code. For this i used COM interop service. All goes...
3 Mar 2021 by OriginalGriff
Firstly,you aren't calling GetResponseAsync in that code. Secondly, half the other stuff we have no idea what exactly they are: JObject, what is returned by your GetResponse call. Thirdly, why are you preparing a byte array version of your...
3 Mar 2021 by rtksmithjoton123
When upload a large file, the iis will occur to a http 413 error. And the response body is html. But I want to customize the response body. How can I do it? What I have tried: I find some blogs and other way to excute it. But no this configuration.
18 Jan 2021 by Han Bo Sun
Another tutorial on file upload with AngularJS, using FormData for multipart file upload
26 Nov 2020 by honey the codewitch
Efficiently send large amounts of data with a tiny amount of memory
22 Nov 2020 by honey the codewitch
Revisiting our WiFi enabled smart clock project with more modern hardware
5 Nov 2020 by honey the codewitch
Explore an Arduino based IoT web server and UDP multicaster for monitoring a remote water pump
4 Nov 2020 by honey the codewitch
Unleash the tiny ESP-01 on your network
23 Jul 2020 by honey the codewitch
Explore adapting Socket's async model to a task based one and adding some awaitable socket operations to your projects
6 Jul 2020 by Mircea Neacsu
Make yourself a HTTP server in 20 lines or less
30 Jun 2020 by Sandeep Mewara
Evaluating the effect of using single vs multiple instances of HttpClient
22 May 2020 by Kamran Saeedi
An idea on how to use .NET ExpressionVisitor to translate lambda expressions into classes that encapsulate data suitable for filtering data & creating query strings
25 Mar 2020 by Member 11416690
I have installed IBM HTTP server in webserver and the web link is up and running. But the link is only working for me.it is not working for another persons. Can you pls help gus what will be the issue. What I have tried: I have tried changing...
24 Mar 2020 by priyanka_jns
Hi All,I have to post some data from asp.net to Webservice using HTTP post.While I am trying to POST data to a Restful service and getting this error. Any help greatly appreciated.Length = 'dataStream.Length' threw an exception of type 'System.NotSupportedException'Position =...
9 Mar 2020 by Raghurss
I was just reading an article about serverless computing and its future. So, in this article, this term called 'stateless' was mentioned. Can anyone explain this term 'stateless' as if to a guy who is not much into tech? What I have tried: I...
9 Mar 2020 by OriginalGriff
Quote: what I understood was there will be no state stored in the server between any two requests. And that is exactly right: there is no state preserved between requests: a request is complete in itself and does not retain information for later...
4 Mar 2020 by Kamran A
How to track requests across a cluster using distributed counters and sliding time windows
4 Mar 2020 by Łukasz Bownik
The article tries to map a deeper, more generic nature of REST architectural style into HTTP to show protocol deficiencies.
23 Jan 2020 by dnibbo
Ok, using a .NET application I am POSTing web requests to an API which is poorly supported; will not mention Microsoft by name but it is theirs! When I POST valid data all is good and I get a HTTP Created response as expected, yippee... However, when I post invalid data I don't get a response...
17 Dec 2019 by judah9107
Hi, I get always that error "The underlying connection was closed: An unexpected error occurred on a send" when I try to invoke the REST service by GET method. (The service Respond in JSON Format)this is my code:string uri =...
14 Dec 2019 by PIEBALDconsult
So, my boss told me we need to download some data from another team's site -- within the company domain, it's trustworthy, right? -- but they have a bad certificate (wrong name for the server or some such). I'm sure they'll get it straightened out by the time we need to get this feed into...
14 Dec 2019 by phil.o
Did you try to install offending certificate in the list of trusted sources for the account under which the program is running?mmc -a ... add a component to the mmc to handle certificates ... etc. I had to do this a few months ago to be able to access a wiki running in a private vm. I remember...
27 Oct 2019 by Jassim Rahma
Hi, I am trying to store image from URL into an image viewmodal but getting: the best overloaded method has some invalid arguments What I have tried: Here is what is m trying: viewModel.Image = ImageSource.FromUri(string.Format("https://www.domain.com/gallery/channels/{0}/{1}.png",...
27 Oct 2019 by OriginalGriff
The ImageSource.FromUri(Uri) Method (Xamarin.Forms)[^] expects a URI class instance as it's single parameter, not a string. Try this: viewModel.Image = ImageSource.FromUri(new URI(string.Format(...)));
30 Sep 2019 by veeramanidhana
If your service is https then add this line before webclient call ServicePointManager.SecurityProtocol = (SecurityProtocolType)768 | (SecurityProtocolType)3072;
18 Sep 2019 by Member 14367686
hi i`m making program taking my picture and uploading at http SERVER. now i already successed to make uploading picture by using Networkmanager.post function. but i have some problem. post function is needed request and QDeviceIO type object. so if i upload image, i have to upload by QFile or...
16 Sep 2019 by irfanansari
i upload website it is shows error i do not know how and why Config Source: 13: 14:
16 Sep 2019 by MadMyche
Your XML is invalid; you need to close out the first section group before opening another
13 Sep 2019 by Jassim Rahma
Hi, I am trying to consume a government web service to get address details. I tried below code but it returns nothing although it works fine when I try it on my WinForm when using Add Web Service A sample valid number is mention in the attached project 1923578758 What I have tried: Here...
11 Sep 2019 by honey the codewitch
A simple home HTTP server that works across all .NET platforms
8 Sep 2019 by honey the codewitch
A Tiny Dynamic Home Webserver in .NET that runs on Core and DNF both (Take 2)
3 Aug 2019 by Dimbu9
Hi guys I need to create a simple java program that allows me to get a m3u8 link contained in the website passed as a parameter. I have to retrieve the http header of the website ?, how can I do? google dev tools (f12) https://i.imgur.com/4xgchaw.png[^] What I have tried: i tried to use...
3 Aug 2019 by Afzaal Ahmad Zeeshan
Since you want to parse an HTML document and read its contents, there are two ways. First of them (the easy way) would be to use an HTML parser and then read the header values one by one. I have not heard of any in Java but with C# we had HtmlAgilityPack[^]; which in Java is somewhere to be like...
6 Jun 2019 by OriginalGriff
Probably, yes - but it will cost you! See here: All Registered Domains - WhoIs[^]
6 Jun 2019 by Member 14484020
can I get a list of all http sites in the world? What I have tried: I've tried inurl:http but it takes forever to get even a bunch of sites right and I have to think of new keywords everytime to get the sites. Is there kind of a directory or a script i could use to filter the http from all...
15 May 2019 by Han Bo Sun
In this tutorial, I am going to discuss how ngResource works. I will demo all 4 HTTP verbs (or methods), and multiple ways request input data can be packaged. It will be a very fun tutorial.
10 May 2019 by Member 14362952
This is related to TLS, Just upgrade the .net to the latest version. This happens when the server denies tlsv1.0 or tlsv1.0 is disabled from the server side. To resolve this from the client side just upgrade to the latest version and see.
29 Apr 2019 by gani7787
I am using some web service and for testing i am posting data through POSTMAN tool. Inside the body of the postman tool, i am passing credential of the database and SQL Queries. Finally i am getting the response as string value. The same i want to post through my ASP.net C# code. i am trying...
24 Apr 2019 by SGAU
I have below response that I got by sending GET request to some server (GET /k/302.html HTTP/1.0) using java socket connection. HTTP/1.1 200 OK Date: Thu, 25 Apr 2019 06:31:21 GMT Server: Apache/2.4.29 (Ubuntu) Last-Modified: Thu, 11 Apr 2019 11:44:58 GMT ETag: "59-5863fb73cdcbb" Accept-Ranges:...
24 Apr 2019 by Christian Graus
You can search for href= to get relative urls. Basically if a regex doesn't work, work out the cases where it doesn't and string mash them
8 Apr 2019 by AtulSharma609
private void getResponce() { string requestJson = string.Empty; using (StreamReader reader = new StreamReader(System.Web.HttpContext.Current.Request.InputStream)) { requestJson = reader.ReadToEnd(); string returnUrl =...
8 Apr 2019 by AtulSharma609
Hello can anyone help me do this , i do not know PHP and i have to do this in asp.net c# function sign_ipn($reply, $token) { ksort($reply); $flat_reply = ""; foreach ($reply as $key=>$value) { $flat_reply = $flat_reply."$key=$value&"; } $flat_reply =...
7 Apr 2019 by OriginalGriff
Translating code from one language to another rarely works well, unless they share a common "philosophy" and framework, like VB and C#. But PHP and C# are very, very different: one is an interpreted language, and the other is compiled. They do not share a framework. Converting a (fairly poorly...
23 Mar 2019 by Martin Vorbrodt
XML-RPC
14 Mar 2019 by Samira Radwan
Hi All, I'm trying to send/POST a binary file to a local server using java HttpURLConnection and all seems to work fine. The server receives the file I can see it. The problem is I'm not receiving a response, which i should. When uploading the file from html page the browser shows the...
14 Mar 2019 by Chad3F
Have you tried removing the BufferedInputStream()? If the server hasn't closed the stream yet, it may still be waiting to buffer more data (or reach EOF, which never happens). Based on your given expected output, I wasn't sure if you accidentally pasted multiple times or the server is "pushing"...
5 Mar 2019 by Member 13995616
This is my code for web-server.cpp file #include #include #include #include #include #include #include #include #include #include #include #include ...