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
efe54d9e
Unverified
Commit
efe54d9e
authored
Aug 09, 2018
by
Dennis Jenkins
Committed by
GitHub
Aug 09, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #202 from JenniferBuehler/add_query_access
Added support to get parameters from Query
parents
2a0d0db0
0c45ff5a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
include/pistache/http.h
include/pistache/http.h
+23
-0
No files found.
include/pistache/http.h
View file @
efe54d9e
...
...
@@ -9,7 +9,9 @@
#include <type_traits>
#include <stdexcept>
#include <array>
#include <vector>
#include <sstream>
#include <algorithm>
#include <sys/timerfd.h>
...
...
@@ -103,6 +105,27 @@ namespace Uri {
params
.
clear
();
}
// \brief Return iterator to the beginning of the parameters map
std
::
unordered_map
<
std
::
string
,
std
::
string
>::
const_iterator
parameters_begin
()
const
{
return
params
.
begin
();
}
// \brief Return iterator to the end of the parameters map
std
::
unordered_map
<
std
::
string
,
std
::
string
>::
const_iterator
parameters_end
()
const
{
return
params
.
begin
();
}
// \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:
//first is key second is value
std
::
unordered_map
<
std
::
string
,
std
::
string
>
params
;
...
...
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