[OpenSIPS-Users] empty reply for db_http

Vitalii Aleksandrov vitalik.voip at gmail.com
Fri Jan 25 09:43:16 EST 2019


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!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20190125/cb28bf79/attachment.html>


More information about the Users mailing list