How does one perform am API based update to the "httpd_db_handlers" section of 
the config.


Given something like this:


[httpd_db_handlers]
_my_function = {couch_httpd_external, handle_external_req, <<"my_function">>}

I try to update it with:

  couchSend( "PUT /_config/httpd_db_handlers/_my_function", 

     "{couch_httpd_external, handle_external_req, <<\"my_functioni\"\>>}" );

If failing with a "invalid JSON"...  Which I can see that it is.
It logs  "lexical error: invalid char in json text.\n"}},  But doesn't tell me 
which character it doesn't like.


However, I was able to update something else like this:

     couchSend( "PUT /_config/log/include_sasl", 

      "\"false\"" );

And it works fine.

Without wasting a bunch of bandwidth telling ALL the different ways I have 
tried to escape the quotes, added extra quotes, encoded angle brackets, braces, 
tried using text/plain, text/html, etc... (or tell my boss how much it cost him 
while I am trying all different these ways, and doing web searches)  I figure 
I'll just give up and ask.  :-)


How does one encode the following string for an API based config update?

    {couch_httpd_external, handle_external_req, <<"my_function">>}

Thanks.
-Scott

Reply via email to