[WinXP+curl] This API does not support parsing form-encoded input.

Showing 1-5 of 5 messages
[WinXP+curl] This API does not support parsing form-encoded input. Alexander Katasonov 5/3/11 5:49 AM
When I running following example on WinXP:

=====================================================================
curl.exe -k https://www.googleapis.com/urlshortener/v1/url -H 'Content-
Type: application/json' -d {"longUrl":"http://www.google.com/"}'
=====================================================================

I get error:
=====================================================================
{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "parseError",
    "message": "This API does not support parsing form-encoded input."
   }
  ],
  "code": 400,
  "message": "This API does not support parsing form-encoded input."
 }
}
curl: (6) Could not resolve host: application; Host not found
=====================================================================


I have downloaded curl for windows from the following url:

http://www.gknw.net/mirror/curl/win32/curl-7.21.6-ssl-sspi-zlib-static-bin-w32.zip

Help me, please, to understand where is the problem?
Re: This API does not support parsing form-encoded input. Mohammad S Anwar 5/4/11 10:56 AM
Even I get the same error.
Not sure what is solution. Could you please share with me if you
manage to solve it?

On May 3, 1:49 pm, Alexander Katasonov <alexander.kataso...@gmail.com>
wrote:


> When I running following example on WinXP:
>
> =====================================================================
> curl.exe -khttps://www.googleapis.com/urlshortener/v1/url-H 'Content-

> Type: application/json' -d {"longUrl":"http://www.google.com/"}'
> =====================================================================
>
> I get error:
> =====================================================================
> {
>  "error": {
>   "errors": [
>    {
>     "domain": "global",
>     "reason": "parseError",
>     "message": "This API does not support parsing form-encoded input."
>    }
>   ],
>   "code":400,
>   "message": "This API does not support parsing form-encoded input."
>  }}
>
> curl: (6) Could not resolve host: application; Host not found
> =====================================================================
>
> I have downloaded curl for windows from the following url:
>
> http://www.gknw.net/mirror/curl/win32/curl-7.21.6-ssl-sspi-zlib-stati...

>
> Help me, please, to understand where is the problem?

Re: This API does not support parsing form-encoded input. Eduardo Cereto Carvalho 7/3/11 5:22 PM
I'm seeing the same error except that I'm trying to query the API via google Apps Script.

Here's my actual code:


I'm receiving the exact same error message coming from the call at line 25
Re: [google-url-shortener] Re: This API does not support parsing form-encoded input. Ben D'Angelo 7/6/11 4:35 AM
Looks like UrlFetchApp has a custom contentType argument, so you should probably specify it there directly instead of in the headers:
Re: [google-url-shortener] Re: This API does not support parsing form-encoded input. Eduardo Cereto Carvalho 7/6/11 12:40 PM
It works, thanks--
Eduardo Cereto Carvalho