2018-07-30 04:40:03 +00:00
|
|
|
#ifndef HTTP_H
|
|
|
|
#define HTTP_H
|
|
|
|
|
|
|
|
#include <types.h>
|
|
|
|
#include "session.h"
|
|
|
|
|
2018-08-01 05:05:19 +00:00
|
|
|
enum RequestResult {
|
|
|
|
REQUEST_SUCCESSFUL = 0,
|
|
|
|
NETWORK_ERROR,
|
|
|
|
NO_RESPONSE,
|
|
|
|
INVALID_RESPONSE,
|
|
|
|
EXCESSIVE_REDIRECTS,
|
|
|
|
UNSUPPORTED_RESPONSE,
|
|
|
|
UNSUPPORTED_HEADER_VALUE,
|
2018-08-01 06:37:22 +00:00
|
|
|
REDIRECT_ERROR,
|
|
|
|
NOT_DESIRED_CONTENT,
|
|
|
|
DIFFERENT_LENGTH, /* Might be considered successful later */
|
2018-08-01 05:05:19 +00:00
|
|
|
};
|
|
|
|
|
2018-07-31 02:35:45 +00:00
|
|
|
Boolean BuildHTTPRequest(Session *sess, char *resourceStr);
|
2018-08-01 06:53:49 +00:00
|
|
|
enum RequestResult DoHTTPRequest(Session *sess, unsigned long start, unsigned long end);
|
2018-07-30 04:40:03 +00:00
|
|
|
|
|
|
|
#endif
|