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
3
votes
0 answers

Is the Google API for the id token too slow for some cases?

Since recently I didn't have any problems to obtain an id token and use it, but since maybe two weeks obtaining a new token (deleting the old and obtaining a new one) and verifying it doesn't work properly. I have an android app on the client side…
3
votes
2 answers

Insufficient data written when inserting rows

I am facing this error when running my unit test to insert some rows into my bigquery table today : Caused by: java.io.IOException: insufficient data written at…
rd3n
  • 4,440
  • 1
  • 33
  • 45
2
votes
1 answer

How do I deserialize a json String to Java Object in App Engine

I have a UI which sends this object - com.google.api.services.compute.model.Network in JSON format as part of a HTTP request. I need to deserialize this object to the Java object. How do I do that? I wrote a simple POJO like below to mimic the…
2
votes
1 answer

What does <<$$$ mean in a Unix shell?

I'm using the google-http-client for a project at work and when I do some requests I have the following thing printed on my console. curl -v --compressed -X POST -H 'Accept-Encoding: gzip' -H 'User-Agent: Google-HTTP-Java-Client/1.23.0 (gzip)' -H…
George Tarida
  • 131
  • 1
  • 7
2
votes
0 answers

Firebase ID token from client App gives Exception on Java backend verification

I've just started using Firebase. React app + Java backend. React side authorization works well however when I send user's id token to backend and try to verify is using firebase library I get an exception. I took all code from documentation. in js…
2
votes
0 answers

Google OAuth authenticate as page account

I'm lost on this one. The problem is simple: what is the correct, recommended way in Android of logging in a Google user, as a page that they own (e.g. they first login and they are presented with what page they wish to authenticate as, to the…
2
votes
2 answers

Why is JsonHttpContent's output empty?

I am using Google Http Client library (1.20) on Google App Engine (1.9.30) to submit a POST request to Google Cloud Messaging (GCM) servers. Here's the code: public static HttpRequestFactory getGcmRequestFactory() { if (null == gcmFactory) { …
markvgti
  • 4,321
  • 7
  • 40
  • 62
2
votes
1 answer

Configuring the GsonFactory of Google HTTP Client

I'm trying to set a date format for the parsing of a JSON object coming from a Google HTTP Client Request. The line where I try to parse directly into objects request.execute().parseAs(..) does not work because of a date format issue. The objects…
Philippe Sabourin
  • 8,066
  • 3
  • 31
  • 46
2
votes
0 answers

WebDAV java client with OAuth2, Basic, NTLM or Negotiate Authentication mechanism

Does google-http-java-client library will help to support WebDAV using OAuth2, Basic, NTLM or Negotiate Authentication mechanism?
2
votes
1 answer

Set-Cookie with Google HTTP Client Library for Java

I just started using the Google HTTP Client Library for Java and I like it a lot. However, I don't know if there's an easy way to handle the case when a server sends header Set-Cookie. I looked through documentation, sample code, and Javadoc and…
dhalsim2
  • 936
  • 2
  • 12
  • 35
2
votes
3 answers

Parse anonymous array from JSON result with Google HTTP Client Library

My REST service respons with the following data: [ { "name": "Bart", "age": 10 }, { "name": "Homer", "age": 42 }, { "name": "Marjorie", "age": 34 } ] The result set is an array…
Benny Code
  • 51,456
  • 28
  • 233
  • 198
2
votes
0 answers

Setting up google-http-java-client in eclipse for android project

I am trying to set up the google-http-java-client on eclipse (without utilizing maven) for an android application project. After following the steps below, when attempting to import any of the com.google.api.services... or com.google.api.client...…
rweberc
  • 21
  • 3
2
votes
1 answer

How to upload file using RoboSpice Google Http Java Client module with JSON Data

I'm using RoboSpice Google Http Java Client module and I'm successfully executing POST request using JSON data. Problem : My problem is now I've to attach byte[] data in POST request but I'm unable to find any way to do this with RoboSpice Google…
Vipul Purohit
  • 9,807
  • 6
  • 53
  • 76
2
votes
1 answer

Robospice Cached Object is Always null

For some reason pulling a cached object back from the cache in Robospice is always null. Is there something I'm doing wrong? getSpiceManager().execute(cardRequest, Card.class.getName(), DurationInMillis.ONE_DAY, new…
Graeme
  • 1,107
  • 2
  • 12
  • 30
2
votes
2 answers

Send JSON in Post with robospice google http client

I have a problem with creating post requests and send json with Robospice google http java client. My problem is, that the server receives an empty request data. (Nothing in postData) @Override public AjaxResult loadDataFromNetwork() throws…