How to POST request to Google Shortener API with Google API Java Client and parse a JSON response?
问题 I want to use the Google Shortener API. I want to use the google api java client library to post a request and parse the JSON response. Next, I post the code I have tried: import java.io.IOException; import net.sf.json.JSONObject; import com.google.api.client.googleapis.GoogleHeaders; import com.google.api.client.googleapis.GoogleTransport; import com.google.api.client.googleapis.json.JsonCParser; import com.google.api.client.http.HttpRequest; import com.google.api.client.http.HttpResponse;