Loading ...
Sorry, an error occurred while loading the content.

Re: Post params don't show up on server side

Expand Messages
  • tssha
    ... http://www.nabble.com/Content-type:-application-x-www-form-urlencoded--c ... You have the correct way to turn off the header and setting your own. // If
    Message 1 of 8 , Jun 1, 2007
    • 0 Attachment
      --- In ydn-javascript@yahoogroups.com, "jameschao122" <jchao@...> wrote:
      >
      > Hi Thomas,
      >
      > I'm using Apache::ASP and it seems like the problem lies with that.
      > According to
      >
      http://www.nabble.com/Content-type:-application-x-www-form-urlencoded--c\
      > harset%3Dutf-8-t1834467.html, it seems like Apache::ASP expects the
      > content type to be exactly "application-x-www-form-urlencoded", even
      > though the HTTP specs allow for more than that.
      >
      > So, I'll just have to live with the workaround I've found. It would be
      > nice if there was a better API for changing this though (or am I using

      You have the correct way to turn off the header and setting your own.

      // If you call resetDefaultHeaders here,
      // you'll lose the custom header "X-Requested-With:XMLHttpRequest".
      YAHOO.util.Connect.resetDefaultHeaders();

      // The ability to turn the default POST header was to
      // accommodated those who did not want to use this header
      // as part of their POST request.
      YAHOO.util.Connect.setDefaultPostHeader(false);

      YAHOO.util.Connect.initHeader(
      'Content-Type',
      'application/x-www-form-urlencoded',
      true
      );

      And, if you are interested:
      http://sourceforge.net/tracker/index.php?func=detail&aid=1689122&group_id=165715&atid=836476

      Regards,
      Thomas
    Your message has been successfully submitted and would be delivered to recipients shortly.