Post Feed to GSA from AJAX Form

15 views
Skip to first unread message

Esch

unread,
Feb 9, 2012, 8:52:53 PM2/9/12
to Google Search Appliance/Google Mini - Google Search Appliance/Google Mini
Does anyone know how I can post a feed through an AJAX form?

My GSA is on a sub-domain but I continue to get a Bad Request or
access denied. If I do a standard form submit it works fine. I'm
simply trying add a better user experience other then sending them to
a blank page that says 'success'.

Any ideas or help would be much appreciated.

cheers,
matt

Dave Watts

unread,
Feb 9, 2012, 9:11:36 PM2/9/12
to google-search-...@googlegroups.com
> Does anyone know how I can post a feed through an AJAX form?
>
> My GSA is on a sub-domain but I continue to get a Bad Request or
> access denied. If I do a standard form submit it works fine. I'm
> simply trying add a better user experience other then sending them to
> a blank page that says 'success'.

Well, first, it's worth asking why you'd post a feed through a browser
at all. The Feeds API isn't really intended for interactive use.
Instead, you should write a feed client that builds an HTTP request to
do this for you. The whole process should be automated as much as
possible.

That said, if you are going to use a browser, you can't do
multipart/form-data POSTs from AJAX. Normally, when you upload a file,
this is the encoding type you'd use. While the appliance does, in
theory, support the default form encoding time
(application/x-www-urlencoded), you're stuck with significant length
limitations if you do. That's probably why you're getting that bad
request - it's being truncated somewhere in the middle.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.

Reply all
Reply to author
Forward
0 new messages