Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
E
esp32-http-server
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
esp32-http-server
Commits
0b7b9054
Commit
0b7b9054
authored
7 years ago
by
Tiago Medicci
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added index.html at library file (to be referenced outside the .c)
parent
cac5fb0c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
18 deletions
+18
-18
https_server.c
https_server.c
+0
-18
https_server.h
https_server.h
+18
-0
No files found.
https_server.c
View file @
0b7b9054
...
...
@@ -139,24 +139,6 @@ static esp_err_t add_keyval_pair(http_header_list_t *list, const char* name, con
static
const
char
*
TAG
=
"http_server"
;
const
static
char
index_html
[]
=
"<!DOCTYPE html>"
"<html>
\n
"
"<head>
\n
"
" <meta name=
\"
viewport
\"
content=
\"
width=device-width, initial-scale=1
\"
>
\n
"
" <style type=
\"
text/css
\"
>
\n
"
" html, body, iframe { margin: 0; padding: 0; height: 100%; }
\n
"
" iframe { display: block; width: 100%; border: none; }
\n
"
" </style>
\n
"
"<title>HELLO ESP32</title>
\n
"
"</head>
\n
"
"<body>
\n
"
"<h1>Hello World, from ESP32!</h1>
\n
"
"</body>
\n
"
"</html>
\n
"
;
const
static
char
response_OK
[]
=
"OK!
\n
"
;
esp_err_t
http_register_handler
(
http_server_t
server
,
const
char
*
uri_pattern
,
int
method
,
...
...
This diff is collapsed.
Click to expand it.
https_server.h
View file @
0b7b9054
...
...
@@ -81,6 +81,24 @@ typedef struct {
.task_priority = 8, \
}
const
static
char
index_html
[]
=
"<!DOCTYPE html>"
"<html>
\n
"
"<head>
\n
"
" <meta name=
\"
viewport
\"
content=
\"
width=device-width, initial-scale=1
\"
>
\n
"
" <style type=
\"
text/css
\"
>
\n
"
" html, body, iframe { margin: 0; padding: 0; height: 100%; }
\n
"
" iframe { display: block; width: 100%; border: none; }
\n
"
" </style>
\n
"
"<title>HELLO ESP32</title>
\n
"
"</head>
\n
"
"<body>
\n
"
"<h1>Hello World, from ESP32!</h1>
\n
"
"</body>
\n
"
"</html>
\n
"
;
const
static
char
response_OK
[]
=
"OK!
\n
"
;
/**
* @brief initialize HTTP server, start listening
* @param options pointer to http server options, can point to a temporary
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment