Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pistache
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
pistache
Commits
0826dfaa
Commit
0826dfaa
authored
Mar 08, 2018
by
Jennifer Buehler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support to get parameters from Query
parent
71846007
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
include/pistache/http.h
include/pistache/http.h
+16
-4
No files found.
include/pistache/http.h
View file @
0826dfaa
/* http.h
Mathieu Stefani, 13 August 2015
Http Layer
*/
...
...
@@ -9,7 +9,9 @@
#include <type_traits>
#include <stdexcept>
#include <array>
#include <vector>
#include <sstream>
#include <algorithm>
#include <sys/timerfd.h>
...
...
@@ -102,6 +104,16 @@ namespace Uri {
params
.
clear
();
}
// \brief returns all parameters given in the query
std
::
vector
<
std
::
string
>
parameters
()
const
{
std
::
vector
<
std
::
string
>
keys
;
std
::
transform
(
params
.
begin
(),
params
.
end
(),
std
::
back_inserter
(
keys
),
[](
const
std
::
unordered_map
<
std
::
string
,
std
::
string
>::
value_type
&
pair
)
{
return
pair
.
first
;});
return
keys
;
}
private:
std
::
unordered_map
<
std
::
string
,
std
::
string
>
params
;
};
...
...
@@ -140,7 +152,7 @@ public:
drop of 5x with that lock
If this turns out to be a problem, we might be able to replace the weak_ptr
trick to detect peer disconnection by a plain old "observer" pointer to a
trick to detect peer disconnection by a plain old "observer" pointer to a
tcp connection with a "stale" state
*/
#ifdef LIBSTDCPP_SMARTPTR_LOCK_FIXME
...
...
@@ -531,7 +543,7 @@ private:
:
Response
(
request
.
version
())
,
buf_
(
DefaultStreamSize
)
,
transport_
(
transport
)
,
timeout_
(
transport
,
handler
,
std
::
move
(
request
))
,
timeout_
(
transport
,
handler
,
std
::
move
(
request
))
{
}
ResponseWriter
(
const
ResponseWriter
&
other
)
...
...
@@ -686,7 +698,7 @@ namespace Private {
template
<
>
struct
Parser
<
Http
::
Request
>
:
public
ParserBase
{
Parser
()
:
ParserBase
()
{
{
allSteps
[
0
].
reset
(
new
RequestLineStep
(
&
request
));
allSteps
[
1
].
reset
(
new
HeadersStep
(
&
request
));
allSteps
[
2
].
reset
(
new
BodyStep
(
&
request
));
...
...
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