X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=include%2Fyaz%2Furl.h;h=66edc5e56f8bf5c5ad38105f410a115a1bd4f388;hb=c586ade2977ae5f6bf01f24cc7c8a84492c544a8;hp=0deb4db7371cb539403fa233aab825a1974becc3;hpb=94140e7ec2de8ecd8c6f3715121b0502f469c003;p=yaz-moved-to-github.git diff --git a/include/yaz/url.h b/include/yaz/url.h index 0deb4db..66edc5e 100644 --- a/include/yaz/url.h +++ b/include/yaz/url.h @@ -74,11 +74,20 @@ YAZ_EXPORT void yaz_url_set_max_redirects(yaz_url_t p, int num); \param buf content buffer for HTTP request, NULL for empty content \param len content length for HTTP request \returns HTTP response; NULL on ERROR. + + Use yaz_url_get_error to get details if NULL is returned. */ YAZ_EXPORT Z_HTTP_Response *yaz_url_exec(yaz_url_t p, const char *uri, const char *method, Z_HTTP_Header *headers, const char *buf, size_t len); + +/** \brief get last error from yaz_url_exec + \param p handle + \returns message (possibly empty string no error occurred) +*/ +YAZ_EXPORT const char *yaz_url_get_error(yaz_url_t p); + YAZ_END_CDECL #endif