This project is read-only.

contentType as form-urlencoded

Mar 25, 2010 at 3:13 AM

Hey all,

I've been playing around with this control tonight and finding that (via FireBug) on POST it's setting the content-type to "application/x-www-form-urlencoded; charset=UTF-8", which won't work for ASP.NET web services (it must be "application/json; charset=utf-8").  Has anyone else experienced this, or had success posting to an asmx?  Looking at the flexbox code, I can see params being set for the desired content-type, but am a n00b with jQuery so not sure what happens after that point. 


Any ideas?  thanks

Jason

Mar 25, 2010 at 3:00 PM

I fixed this by changing the $.post call to call $.ajax and set the contentType.  I'm not sure if there is a cleaner way...

Mar 25, 2010 at 6:55 PM

That’s pretty clean, in my opinion.  I will make a note of it for the codebase.

Thanks,

Noah

From: jpeterson [mailto:notifications@codeplex.com]
Sent: Thursday, March 25, 2010 7:00 AM
To: Noah Heldman
Subject: Re: contentType as form-urlencoded [flexbox:207224]

From: jpeterson

I fixed this by changing the $.post call to call $.ajax and set the contentType. I'm not sure if there is a cleaner way...

Read the full discussion online.

To add a post to this discussion, reply to this email (flexbox@discussions.codeplex.com)

To start a new discussion for this project, email flexbox@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com