Helper library to parse/create REST. More...
Data Structures | |
struct | GNUNET_REST_RequestHandle |
struct | GNUNET_REST_RequestHandlerError |
struct | GNUNET_REST_RequestHandler |
Macros | |
#define | GNUNET_REST_HANDLER_END { NULL, NULL, NULL } |
Typedefs | |
typedef void(* | GNUNET_REST_ResultProcessor) (void *cls, struct MHD_Response *resp, int status) |
Iterator called on obtained result for a REST result. More... | |
Functions | |
int | GNUNET_REST_namespace_match (const char *url, const char *namespace) |
Check if namespace is in URL. More... | |
struct MHD_Response * | GNUNET_REST_create_response (const char *data) |
Create REST MHD response. More... | |
int | GNUNET_REST_handle_request (struct GNUNET_REST_RequestHandle *conn, const struct GNUNET_REST_RequestHandler *handlers, struct GNUNET_REST_RequestHandlerError *err, void *cls) |
Helper library to parse/create REST.
#define GNUNET_REST_HANDLER_END { NULL, NULL, NULL } |
Definition at line 41 of file gnunet_rest_lib.h.
typedef void(* GNUNET_REST_ResultProcessor) (void *cls, struct MHD_Response *resp, int status) |
Iterator called on obtained result for a REST result.
cls | closure |
resp | the response |
status | status code (HTTP) |
Definition at line 110 of file gnunet_rest_lib.h.
int GNUNET_REST_namespace_match | ( | const char * | url, |
const char * | namespace | ||
) |
Check if namespace is in URL.
url | URL to check |
namespace | namespace to check against |
Check if namespace is in URL.
Definition at line 37 of file rest.c.
Referenced by GNUNET_REST_handle_request().
struct MHD_Response * GNUNET_REST_create_response | ( | const char * | data | ) |
Create REST MHD response.
data | result |
Definition at line 44 of file rest.c.
References data.
Referenced by build_redirect(), consume_fail(), consume_ticket(), create_finished(), del_finished(), delete_finished_cb(), do_error(), do_finished(), do_redirect_error(), do_userinfo_error(), ego_get_all(), ego_get_response(), ego_sign_data_cb(), finished_cont(), get_cont(), handle_gns_response(), import_next_cb(), jwks_endpoint(), login_cont(), login_redirect(), namestore_list_finished(), oidc_config_cors(), oidc_config_endpoint(), oidc_ticket_issue_cb(), options_cont(), return_response(), set_cont(), and token_endpoint().
int GNUNET_REST_handle_request | ( | struct GNUNET_REST_RequestHandle * | conn, |
const struct GNUNET_REST_RequestHandler * | handlers, | ||
struct GNUNET_REST_RequestHandlerError * | err, | ||
void * | cls | ||
) |
Definition at line 64 of file rest.c.
References GNUNET_REST_RequestHandlerError::error_code, GNUNET_asprintf(), GNUNET_free, GNUNET_NO, GNUNET_REST_namespace_match(), GNUNET_YES, handlers, GNUNET_REST_RequestHandle::method, MHD_HTTP_BAD_REQUEST, and GNUNET_REST_RequestHandle::url.
Referenced by REST_config_process_request(), REST_copying_process_request(), REST_gns_process_request(), rest_identity_process_request(), REST_identity_process_request(), REST_namestore_process_request(), REST_openid_process_request(), and REST_reclaim_process_request().