0

issue in posting to meme

Hi,
array
'method' => string 'GET' (length=3)
'url' => string 'http://query.yahooapis.com/v1/yql?q=INSERT%20INTO%20meme.user.posts%20%28type%2C%20content%29%20VALUES%20%28%22text%22%2C%20%22This%20is%20a%20text%20post%20from%20YQL%20from%20meme%20application%21%22%29&format=json&env=http%3A%2F%2Fdatatables.org%2Falltables.env' (length=264)
'code' => int 400
'requestHeaders' =>
array
0 => string 'Accept: application/json' (length=24)
1 => string 'Authorization: OAuth realm="yahooapis.com",oauth_version="1.0",oauth_nonce="2be567434160e0871459da0d1bee833c",oauth_timestamp="1257760118",oauth_consumer_key="*************",oauth_token="A%3DMaQyYX3KkBvOUN_etEGzKWYDwOVBBVkSgoIuyGJnbnXp3h.TYcEJkXiAIdggzP7fPmqszv_GC194lo
Y44SX2shO3nYVBRC5t_Pk.hOOlsBywS.BeL6qewrJqRTqFJhzBFvr545EnEab4Ydh679tLwZNBYCQVtoC
lQvPkJeHgxT4j7HeG3cIaWmuZK85g3zVHkhEvqen2_mQpzbgD_YGY6VPMmRBnaw_5fmcDwtZy0s'... (length=1135)
'requestBody' => null
'responseHeaders' =>
array
'Date' => string 'Mon, 09 Nov 2009 09:48:38 GMT' (length=29)
'P3P' => string 'policyref="http://info.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC GOV"' (length=209)
'Access-Control-Allow-Origin' => string '*' (length=1)
'Vary' => string 'Accept-Encoding' (length=15)
'Content-Type' => string 'application/json;charset=utf-8' (length=30)
'Age' => string '0' (length=1)
'Server' => string 'YTS/1.17.21' (length=11)
'Cache-Control' => string 'private, proxy-revalidate' (length=25)
'Transfer-Encoding' => string 'chunked' (length=7)
'Proxy-Connection' => string 'Keep-Alive' (length=10)
'Connection' => string 'Keep-Alive' (length=10)
'responseBody' => string '{"error":{"lang":"en-US","diagnostics":{"publiclyCallable":"true","url":{"execution-time":"139","proxy":"DEFAULT","content":"http://datatables.org/alltables.env"}},"description":"Unable to execute YQL statement, wrong HTTP verb. Allowed HTTP methods for INSERT are PUT, POST and DELETE or GET with JSONP"}}' (length=306)

Please let me know how to go ahead with the issue.I am able to execute select statements but not insert,update and delete.please let me know how to proceed with same
awaiting your kind help

by
2 Replies
  • Hi Usha,

    You can either use the POST method for the INSERT query where the parameters would be q=your_query and format to get this to work OR append another query parameter to your GET request something like &callback=foo.

    We prevent non-idempotent methods on a GET unless you specify a callback parameter OR use the other http methods such as POST, PUT

    hope that helps

    -- Nagesh

    QUOTE (Usha @ Nov 9 2009, 01:57 AM) <{POST_SNAPBACK}>
    Hi,
    array
    'method' => string 'GET' (length=3)
    'url' => string 'http://query.yahooapis.com/v1/yql?q=INSERT%20INTO%20meme.user.posts%20%28type%2C%20content%29%20VALUES%20%28%22text%22%2C%20%22This%20is%20a%20text%20post%20from%20YQL%20from%20meme%20application%21%22%29&format=json&env=http%3A%2F%2Fdatatables.org%2Falltables.env' (length=264)
    'code' => int 400
    'requestHeaders' =>
    array
    0 => string 'Accept: application/json' (length=24)
    1 => string 'Authorization: OAuth realm="yahooapis.com",oauth_version="1.0",oauth_nonce="2be567434160e0871459da0d1bee833c",oauth_timestamp="1257760118",oauth_consumer_key="*************",oauth_token="A%3DMaQyYX3KkBvOUN_etEGzKWYDwOVBBVkSgoIuyGJnbnXp3h.TYcEJkXiAIdggzP7fPmqszv_GC194lo
    Y44SX2shO3nYVBRC5t_Pk.hOOlsBywS.BeL6qewrJqRTqFJhzBFvr545EnEab4Ydh679tLwZNBYCQVto
    C
    lQvPkJeHgxT4j7HeG3cIaWmuZK85g3zVHkhEvqen2_mQpzbgD_YGY6VPMmRBnaw_5fmcDwtZy0s'... (length=1135)
    'requestBody' => null
    'responseHeaders' =>
    array
    'Date' => string 'Mon, 09 Nov 2009 09:48:38 GMT' (length=29)
    'P3P' => string 'policyref="http://info.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC GOV"' (length=209)
    'Access-Control-Allow-Origin' => string '*' (length=1)
    'Vary' => string 'Accept-Encoding' (length=15)
    'Content-Type' => string 'application/json;charset=utf-8' (length=30)
    'Age' => string '0' (length=1)
    'Server' => string 'YTS/1.17.21' (length=11)
    'Cache-Control' => string 'private, proxy-revalidate' (length=25)
    'Transfer-Encoding' => string 'chunked' (length=7)
    'Proxy-Connection' => string 'Keep-Alive' (length=10)
    'Connection' => string 'Keep-Alive' (length=10)
    'responseBody' => string '{"error":{"lang":"en-US","diagnostics":{"publiclyCallable":"true","url":{"execution-time":"139","proxy":"DEFAULT","content":"http://datatables.org/alltables.env"}},"description":"Unable to execute YQL statement, wrong HTTP verb. Allowed HTTP methods for INSERT are PUT, POST and DELETE or GET with JSONP"}}' (length=306)

    Please let me know how to go ahead with the issue.I am able to execute select statements but not insert,update and delete.please let me know how to proceed with same
    awaiting your kind help
    0
  • QUOTE (Nagesh Susarla @ Nov 9 2009, 10:48 AM) <{POST_SNAPBACK}>
    Hi Usha,

    You can either use the POST method for the INSERT query where the parameters would be q=your_query and format to get this to work OR append another query parameter to your GET request something like &callback=foo.

    We prevent non-idempotent methods on a GET unless you specify a callback parameter OR use the other http methods such as POST, PUT

    hope that helps

    -- Nagesh

    Thanks Nagesh it finally worked with GET when i added Callback parameter
    0

Recent Posts

in YQL