0

405 error, what am i doing wrong?

I'm probably just being thick but why am I getting this 405 Method Not Allowed error when I do this call?

http://wherein.yahooapis.com/v1/document?d...EDSzL3FiqnnBlg-


thanks!

by
5 Replies
  • QUOTE (Brian @ Sep 10 2010, 09:27 AM) <{POST_SNAPBACK}>
    I'm probably just being thick but why am I getting this 405 Method Not Allowed error when I do this call?

    http://wherein.yahooapis.com/v1/document?d...EDSzL3FiqnnBlg-


    thanks!


    Placemaker only responds to requests using the HTTP POST method, due to the potentially large size of the documentContent parameter. Requests using the HTTP GET method, such as your example, will generate a 405 Method Not Allowed status.

    Eddie Babcock
    Yahoo! Geo Technologies
    0
  • QUOTE (Eddie B @ Sep 10 2010, 02:34 PM) <{POST_SNAPBACK}>
    Placemaker only responds to requests using the HTTP POST method, due to the potentially large size of the documentContent parameter. Requests using the HTTP GET method, such as your example, will generate a 405 Method Not Allowed status.

    Eddie Babcock
    Yahoo! Geo Technologies





    Great thanks. Quick (hopefully) followup question - using a FF plugin called Poster, should be straight forward but getting an error. Here's the input


    http://wherein.yahooapis.com/v1/document

    documentURL=brighton by the sea
    documentType=text/plain
    appid=Cp1x9gXV34HgvQ_1QNjgnWwmUzprn6tAnscHqUf5PxTmbmTn9EDSzL3FiqnnBlg-




    and this is the response, it keeps throwing that error I'm not including a valid non-empty document type. But I think i am, tried a few variants but no joy.

    <?xml version="1.0" encoding="UTF-8" ?>
    <yahoo:error xmlns:yahoo="http://www.yahooapis.com/v1/base.rng" xmlns:cle="http://wherein.yahooapis.com/v1/schema.rng" xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="en"><yahoo:description><![CDATA[Please provide a valid non-empty document type.]]></yahoo:description>
    <yahoo:detail><code>-9995</code>
    <cause>input</cause>
    </yahoo:detail></yahoo:error>


    appreciate you're not in the mode of troubleshooting some 3rd party app but wondered if anything obvious stands out from that

    thanks!
    0
  • QUOTE (Brian @ Sep 13 2010, 08:54 AM) <{POST_SNAPBACK}>
    Great thanks. Quick (hopefully) followup question - using a FF plugin called Poster, should be straight forward but getting an error. Here's the input


    http://wherein.yahooapis.com/v1/document

    documentURL=brighton by the sea
    documentType=text/plain
    appid=Cp1x9gXV34HgvQ_1QNjgnWwmUzprn6tAnscHqUf5PxTmbmTn9EDSzL3FiqnnBlg-




    and this is the response, it keeps throwing that error I'm not including a valid non-empty document type. But I think i am, tried a few variants but no joy.

    <?xml version="1.0" encoding="UTF-8" ?>
    <yahoo:error xmlns:yahoo="http://www.yahooapis.com/v1/base.rng" xmlns:cle="http://wherein.yahooapis.com/v1/schema.rng" xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="en"><yahoo:description><![CDATA[Please provide a valid non-empty document type.]]></yahoo:description>
    <yahoo:detail><code>-9995</code>
    <cause>input</cause>
    </yahoo:detail></yahoo:error>


    appreciate you're not in the mode of troubleshooting some 3rd party app but wondered if anything obvious stands out from that

    thanks!


    I looked into Poster, and it can successfully post requests to Placemaker. You will need to encode your POST content according to the "application/x-www-form-urlencoded" specification (see http://www.w3.org/TR/html401/interact/form...ml#h-17.13.4.1). Basically, this works just like query parameters for the GET methods, but with no limits on the number of characters you can send. Click the "Parameter Body" button in Poster to set the Content Type to "application/x-www-form-urlencoded", add "&" between parameters, and replace spaces with "+" or "%20". Here is an example similar to your original example:

    appid=Cp1x9gXV34HgvQ_1QNjgnWwmUzprn6tAnscHqUf5PxTmbmTn9EDSzL3FiqnnBlg-&documentType=text/plain&documentContent=
    Brighton by the sea

    Please note that I changed "documentURL" to "documentContent" since you are providing the actual text to be processed. I also reordered the parameters so that the text to be processed is appended to the request.

    Eddie Babcock
    Yahoo! Geo Technologies
    0
  • QUOTE (Eddie B @ Sep 17 2010, 02:06 PM) <{POST_SNAPBACK}>
    I looked into Poster, and it can successfully post requests to Placemaker. You will need to encode your POST content according to the "application/x-www-form-urlencoded" specification (see http://www.w3.org/TR/html401/interact/form...ml#h-17.13.4.1). Basically, this works just like query parameters for the GET methods, but with no limits on the number of characters you can send. Click the "Parameter Body" button in Poster to set the Content Type to "application/x-www-form-urlencoded", add "&" between parameters, and replace spaces with "+" or "%20". Here is an example similar to your original example:

    appid=Cp1x9gXV34HgvQ_1QNjgnWwmUzprn6tAnscHqUf5PxTmbmTn9EDSzL3FiqnnBlg-&documentType=text/plain&documentContent=
    Brighton by the sea

    Please note that I changed "documentURL" to "documentContent" since you are providing the actual text to be processed. I also reordered the parameters so that the text to be processed is appended to the request.

    Eddie Babcock
    Yahoo! Geo Technologies



    Eddie, thanks very much, I'll give that a go.

    (Apologies for multiple forum posts there btw, was trying to correct my typo about documentContent vs URL, not realising I was reposting each time :)
    0
  • QUOTE (Brian @ Sep 21 2010, 01:18 AM) <{POST_SNAPBACK}>
    Eddie, thanks very much, I'll give that a go.

    (Apologies for multiple forum posts there btw, was trying to correct my typo about documentContent vs URL, not realising I was reposting each time :)Perfect, it works. Thanks again.
    0
This forum is locked.

Recent Posts

in Placemaker General Discussion