Questions tagged [google-http-client]

This refers to the Google HTTP Client Library for Java.

The Google HTTP Client library is a flexible, efficient, and powerful Java client library for accessing any resource on the web via HTTP. It features a pluggable HTTP transport abstraction that allows any low-level library to be used, such as java.net.HttpURLConnection, Apache HTTP Client, or URL Fetch on Google App Engine. It also features efficient JSON and XML data models for parsing and serialization of HTTP response and request content. The JSON and XML libraries are also fully pluggable, including support for Jackson and Android's GSON libraries for JSON.

Supports these Java environments:

  • Java 7 or higher
  • Android 4.4 (Kit Kat)
  • Google App Engine
67 questions
21
votes
6 answers

Google OAuth2 JWT token verification exception

I'm facing OAuth2 JWT token verification exception last hour (so no one can access my application): java.security.SignatureException: Signature length not correct: got 256 but was expecting 128. I'm using google-http-client 1.20.0 and Java 1.7.0.…
user3686724
  • 603
  • 1
  • 5
  • 15
7
votes
2 answers

How to create a repeatable POST request that contains multipart-form-data?

I am trying to create a POST request that contains multipart-form-data that requires NT Credentials. The authentication request causes the POST to be resent and I get a unrepeatable entity exception. I tried wrapping the MultipartContent entity that…
user177800
7
votes
1 answer

Using proxies with Google HTTP Client Library for Java

I use Google HTTP Client Library for Java to make simple JSON requests and parse responses. It works well when I don't go through a proxy. But now I'd like to allow my users to use a proxy (with authentication) functionality in my application. I…
Olivier Grégoire
  • 33,839
  • 23
  • 96
  • 137
6
votes
2 answers

Jersey client async POST request to not wait for response

I have created a simple Jersey client and it is able to successfully do a POST request with a payload. But right now it waits for a response from the http endpoint: public void callEndpoint(String endpoint, String payload) { try { …
Sumitk
  • 1,485
  • 6
  • 19
  • 31
5
votes
1 answer

How to increase ReadTimeout in Google HTTP Client

I have my application running in GAE. This application makes REST call to my CloudML. Here is the code for that GoogleCredential credential = GoogleCredential.getApplicationDefault() …
sag
  • 5,333
  • 8
  • 54
  • 91
5
votes
1 answer

Post multipart form with google-http-java-client

It's not clear from the google-http-java-client* docs how you would go about posting a form that has a file field. For example I'm trying to print a document using the Google Cloud Print API: HttpRequestFactory httpRequestFactory =…
kuhnza
  • 731
  • 1
  • 5
  • 15
4
votes
0 answers

Google-HttpClient: Post request successful but no data added to database

I'm using Google Http Client to code a Post request. Our underlying call is an AJAX post request and the request is successful which return 200 but there is no data added to database. I don't know what wrong with the HTTP Call as the code is design…
nicholas
  • 2,581
  • 14
  • 66
  • 104
4
votes
0 answers

Google HTTP Library JSON Parsing, null value defaults to True

I'm using the Google HTTP Library to parse JSON data received from a get request, but the strange thing that's happening now is that for one of my @Keys, the value that is coming across as JSON is null (hasShipmentBeenPulled): { "orderNo":…
4
votes
1 answer

Garbage collection seems to shutdown local executor and cause RejectedExecutionException

Need help on an intermittent headache. The code is calling com.google.api.client.http.HttpRequest#executeAsync() which basically has the following logic, @Beta public Future executeAsync(Executor executor) { …
Derek
  • 1,085
  • 2
  • 20
  • 36
4
votes
0 answers

Non-blocking implementation of the Google API client's HttpTransport?

I'm running several concurrent API calls, and I was wondering whether a non-blocking implementation of HttpTransport exists for Google Api client. Does anybody know ?
David
  • 5,481
  • 2
  • 20
  • 33
4
votes
0 answers

Google Volley underscore in hostname

I'm using the new Volley http stack from Google in my actual Android project. Everything went fine till i got a hostname with underscore in it (this is the well known bug of the java.net.URL when it ignores the hosname) Is there any known workaround…
4
votes
2 answers

Multipart Request to Box API via Google HTTP Client

I'm trying to call this specific method http://developers.box.com/docs/#files-upload-a-file in Box API with the help of Google HTTP Client library v1.14.1. Currently I see no way of doing this. If I was using…
afrish
  • 3,167
  • 4
  • 30
  • 38
4
votes
1 answer

Standalone app authorization without browser?

Is browser redirection necessary to get autorization and access token ? Is there a way how to get autorization programatically ? I am a bit suprised i found this in the OAuth2 google documentation…
Martin V.
  • 3,560
  • 6
  • 31
  • 47
3
votes
1 answer

ClassNotFoundException: io.opencensus.trace.propagation.TextFormat not found

I have a module in apache karaf 4.2.6 with java 11 that validates purchase receipts in Google Play. I'm using androidpublisher. When it sends a request for the first time I get an error in OpenCensusUtils…
Sergey
  • 31
  • 1
  • 5
3
votes
0 answers

Android oauth2 authorization

I have my own oauth2 provider. I have set the grant type as authorization code. I am able to successfully test this via curl I would like to implement oauth on an android app I am working on. I want to understand the flow. I have read several…
Shekar Tippur
  • 155
  • 2
  • 11
1
2 3 4 5