projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add check for YAZ-700
[yaz-moved-to-github.git]
/
include
/
yaz
/
url.h
diff --git
a/include/yaz/url.h
b/include/yaz/url.h
index
aa5fd4d
..
66edc5e
100644
(file)
--- a/
include/yaz/url.h
+++ b/
include/yaz/url.h
@@
-60,6
+60,12
@@
YAZ_EXPORT void yaz_url_destroy(yaz_url_t p);
*/
YAZ_EXPORT void yaz_url_set_proxy(yaz_url_t p, const char *proxy);
*/
YAZ_EXPORT void yaz_url_set_proxy(yaz_url_t p, const char *proxy);
+/** \brief sets maximum number of redirects
+ \param p handle
+ \param num maximum number of redirects
+*/
+YAZ_EXPORT void yaz_url_set_max_redirects(yaz_url_t p, int num);
+
/** \brief executes the actual HTTP request (including redirects, etc)
\param p handle
\param uri URL
/** \brief executes the actual HTTP request (including redirects, etc)
\param p handle
\param uri URL
@@
-68,11
+74,20
@@
YAZ_EXPORT void yaz_url_set_proxy(yaz_url_t p, const char *proxy);
\param buf content buffer for HTTP request, NULL for empty content
\param len content length for HTTP request
\returns HTTP response; NULL on ERROR.
\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);
*/
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
YAZ_END_CDECL
#endif