# apps/webclient/webclient.h File Reference

## Detailed Description

Header file for the HTTP client.

Author:
  Adam Dunkels <adam@dunkels.com>

Definition in file webclient.h.

`#include "webclient-strings.h"`
`#include "uipopt.h"`

Go to the source code of this file.

## Data Structures

struct | webclient_state

## Defines

#define | WEBCLIENT_CONF_MAX_URLLEN 100
#define | UIP_APPCALL webclient_appcall

## Typedefs

typedef webclient_state | uip_tcp_appstate_t

## Functions

void | webclient_datahandler (char *data, u16_t len)
| Callback function that is called from the webclient code when HTTP data has been received.
void | webclient_connected (void)
| Callback function that is called from the webclient code when the HTTP connection has been connected to the web server.
void | webclient_timedout (void)
| Callback function that is called from the webclient code if the HTTP connection to the web server has timed out.
void | webclient_aborted (void)
| Callback function that is called from the webclient code if the HTTP connection to the web server has been aborted by the web server.
void | webclient_closed (void)
| Callback function that is called from the webclient code when the HTTP connection to the web server has been closed.
void | webclient_init (void)
| Initialize the webclient module.
unsigned char | webclient_get (char *host, u16_t port, char *file)
| Open an HTTP connection to a web server and ask for a file using the GET method.
void | webclient_close (void)
| Close the currently open HTTP connection.
void | webclient_appcall (void)
char * | webclient_mimetype (void)
| Obtain the MIME type of the current HTTP data stream.
char * | webclient_filename (void)
| Obtain the filename of the current HTTP data stream.
char * | webclient_hostname (void)
| Obtain the hostname of the current HTTP data stream.
unsigned short | webclient_port (void)
| Obtain the port number of the current HTTP data stream.