comparison libsci/apic.h @ 50:b474f0985e39

scictl: add API key support
author David Demelier <markand@malikania.fr>
date Wed, 17 Aug 2022 09:11:58 +0200
parents e52c762d8ba8
children 71cd8447e3a4
comparison
equal deleted inserted replaced
49:9d8df0c1db63 50:b474f0985e39
35 #define APIC_ERR_MAX 128 35 #define APIC_ERR_MAX 128
36 /** 36 /**
37 * \brief Maximum URL length. 37 * \brief Maximum URL length.
38 */ 38 */
39 #define APIC_URL_MAX 512 39 #define APIC_URL_MAX 512
40 /**
41 * \brief Maximum URL length.
42 */
43 #define APIC_KEY_MAX (40 + 1)
40 44
41 /** 45 /**
42 * \brief Request context. 46 * \brief Request context.
43 * 47 *
44 * This structure contains the error message and the HTTP return status, 48 * This structure contains the error message and the HTTP return status,
52 /** 56 /**
53 * \brief Client configuration. 57 * \brief Client configuration.
54 */ 58 */
55 extern struct apiconf { 59 extern struct apiconf {
56 char baseurl[APIC_URL_MAX]; /*!< Base API URL for requets. */ 60 char baseurl[APIC_URL_MAX]; /*!< Base API URL for requets. */
61 char key[APIC_KEY_MAX]; /*!< Maximum length for API key. */
57 } apiconf /*! Global variable. */; 62 } apiconf /*! Global variable. */;
58 63
59 /** 64 /**
60 * Perform a GET request. 65 * Perform a GET request.
61 * 66 *