On Jun 28, 2006, at 8:43 PM, Scott Chapman wrote:
> > Bob Ippolito wrote: >> >> On Jun 28, 2006, at 1:27 PM, Scott Chapman wrote: >> >>>> JSON data is not safe for URL encoding, so you really can't >>>> correctly put it in a URL. >>>> http://groups.google.com/group/mochikit/search? >>>> group=mochikit&q=post >>> >>> Bob, >>> I've been reading the POST-related posts in the group and I don't >>> see anything so far telling me that JSON data is not safe for URL >>> encoding. Can you explain why this is the case? >> >> JSON data, literally, can easily contain characters that aren't safe >> for URL encoding, e.g. {"foo/bar":"?baz&"} >> >> In your example, you were putting that *directly* in the URL, so >> you'd end up with this: >> >> /map/{"foo/bar":"?baz&"}/map_points/ >> >> The server is going to parse that URL as: >> >> ('map', '{"foo"', 'bar":"') with a relatively invalid query string of >> '?baz&"}/map_points/' >> >> If you want to put it directly in a URL you're going to have to >> escape it. >> >> This is also totally irrelevant to POST. That search URL was >> answering your second question, not expounding on the first comment. >> > > Bob, > Is any of the POST methods going to make it into MochiKit? It > seems that enough > people have expressed an interest that it might be a good idea. Lots of people have expressed an interest in POST, but there is absolutely no consensus on what the POST function should do. So no, I don't have any immediate plans to make a POST function. A function that lets you set headers, content, encoding, etc. wouldn't really be any less work than doing it as-is. -bob --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "MochiKit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~----------~----~----~----~------~----~------~--~---
