Questions tagged [httpclient]

DO NOT USE - Use [apache-commons-httpclient], [apache-httpclient-4.x], [jetty-httpclient], [java-http-client], [dotnet-httpclient] or [angular-httpclient]

For questions related to the Apache Commons HttpClient v3.x (or older), use .

For questions related to the Apache HttpClient v4.x, use .

For questions related to the Jetty HttpClient class, use .

For questions related to the Java SE HttpClient class introduced in Java 9, use .

For questions related to the .NET class System.Net.Http.HttpClient, use .

For questions related to the Angular HttpClient since v4.3, use .

6985 questions
213
votes
7 answers

Post an empty body to REST API via HttpClient

The API I'm trying to call requires a POST with an empty body. I'm using the WCF Web API HttpClient, and I can't find the right code that will post with an empty body. I found references to some HttpContent.CreateEmpty() method, but I don't think…
Ryan Rinaldi
  • 4,119
  • 2
  • 22
  • 22
170
votes
13 answers

accepting HTTPS connections with self-signed certificates

I'm trying to make HTTPS connections, using HttpClient lib, but the problem is that, since the certificate isn't signed by a recognized Certificate Authority (CA) like Verisign,GlobalSIgn, etc., listed on the set of Android Trusted Certificates, I…
Morten
  • 4,507
  • 7
  • 29
  • 31
146
votes
5 answers

PHP GuzzleHttp. How to make a post request with params?

How to make a post request with GuzzleHttp( version 5.0 ). I am trying to do the following: $client = new \GuzzleHttp\Client(); $client->post( 'http://www.example.com/user/create', array( 'email' => 'test@gmail.com', 'name'…
Arsen
  • 3,541
  • 4
  • 14
  • 7
129
votes
11 answers

What exactly is an HTTP Entity?

Would someone please describe to me what exactly an HTTP entity is? I am reading the HTTPClient documentation, but I do not really understand what that means?
helloThere
  • 1,561
  • 3
  • 16
  • 20
122
votes
3 answers

How to send a Post body in the HttpClient request in Windows Phone 8?

I have written the code below to send headers, post parameters. The problem is that I am using SendAsync since my request can be GET or POST. How can I add POST Body to this peice of code so that if there is any post body data it gets added in the…
Balraj Singh
  • 3,381
  • 6
  • 47
  • 82
107
votes
7 answers

How can I login to a website with Python?

How can I do it? I was trying to enter some specified link (with urllib), but to do it, I need to log in. I have this source from the site: