mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 19:45:11 +00:00
[ADD/WIP] Add some HTTP request code
We can now *register* users!
This commit is contained in:
parent
47c98cbbe3
commit
0fa95c2d14
12 changed files with 320 additions and 11 deletions
|
|
@ -3,16 +3,21 @@
|
|||
|
||||
#include <Cytoplasm/HttpServer.h>
|
||||
#include <Cytoplasm/HttpRouter.h>
|
||||
#include <Cytoplasm/HttpClient.h>
|
||||
#include <Cytoplasm/Stream.h>
|
||||
|
||||
typedef struct ParseeConfig {
|
||||
char *as_token, *hs_token;
|
||||
char *as_token, *hs_token;
|
||||
/* id here is "Parsee XMPP". */
|
||||
char *sender_localpart;
|
||||
char *namespace_base;
|
||||
char *sender_localpart;
|
||||
char *namespace_base;
|
||||
|
||||
char *listen_as;
|
||||
int port;
|
||||
char *listen_as;
|
||||
int port;
|
||||
|
||||
/* Homeserver port info */
|
||||
char *homeserver_host;
|
||||
int homeserver_port;
|
||||
} ParseeConfig;
|
||||
|
||||
typedef struct ParseeData {
|
||||
|
|
@ -42,4 +47,9 @@ extern void ParseeFreeData(ParseeData *);
|
|||
|
||||
/* HTTP server handler for Parsee, takes in a config. */
|
||||
extern void ParseeRequest(HttpServerContext *, void *);
|
||||
|
||||
extern HttpClientContext * ParseeCreateRequest(ParseeConfig *, HttpRequestMethod, char *);
|
||||
|
||||
/* Sends headers, and writes the JSON object. */
|
||||
extern HttpStatus ParseeSetRequestJSON(HttpClientContext *, HashMap *);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue