empty reply for db_http

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

empty reply for db_http

Vitalii Aleksandrov
Hi,
Using db_http and permission modules and can't figure out what exactly should be returned from an HTTP API when 'address' table is empty and SELECT returns no results.

Here is what I tried with no luck:
1.
    Status:
        200 OK
    Body:
        string,int,int,int,string,string,string,int
2.
    Status:
        200 OK
    Body:
        string,int,int,int,string,string,string,int
        ,,,,,,,
3.
    Status:
        200 OK
    Body:
        empty body
4.
    Status:
        404 Not Found
    Body:
        empty

db_http documentation says "If the query is ok (even if the answer is empty) the server must reply with a 200 OK HTTP reply with a body containing the types and values of the columns.". I have no idea what "values" should I return from http API in this corner case. Adding some fake records to a table doesn't look like a good solution.
Any input would be greatly appreciated!



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users