@@ -95,7 +95,7 @@ CURL *API::setup_download_session_(const ghc::filesystem::path &addr_path,
95
95
96
96
Json::Value API::get_request (const ghc::filesystem::path &addr_path,
97
97
long expected_response, std::string token) {
98
- std::string addr_path_ = std ::regex_replace (addr_path.string (), std ::regex (std::string (" \\\\ " )), " /" );
98
+ std::string addr_path_ = boost ::regex_replace (addr_path.string (), boost ::regex (std::string (" \\\\ " )), " /" );
99
99
return get_request (addr_path_, expected_response);
100
100
}
101
101
@@ -180,16 +180,16 @@ std::string API::json_to_query_string(Json::Value &json_value) {
180
180
// add the key and value to the return string after removing the api
181
181
// address with regex
182
182
rtn += key + " =" +
183
- std ::regex_replace (json_value.get (key, " " )[i].asString (),
184
- std ::regex (regex_string), " $3" ) +
183
+ boost ::regex_replace (json_value.get (key, " " )[i].asString (),
184
+ boost ::regex (regex_string), " $3" ) +
185
185
" &" ;
186
186
}
187
187
} else {
188
188
// if it's not an array add the key and value to the return string after
189
189
// removing the api address with regex
190
190
rtn += key + " =" +
191
- std ::regex_replace (json_value.get (key, " " ).asString (),
192
- std ::regex (regex_string), " $3" ) +
191
+ boost ::regex_replace (json_value.get (key, " " ).asString (),
192
+ boost ::regex (regex_string), " $3" ) +
193
193
" &" ;
194
194
}
195
195
}
@@ -200,7 +200,7 @@ std::string API::json_to_query_string(Json::Value &json_value) {
200
200
201
201
std::string API::escape_space (std::string &str) {
202
202
// Using regex replace space with html character (%20)
203
- return std::string (std ::regex_replace (str, std ::regex (" " ), " %20" ));
203
+ return std::string (boost ::regex_replace (str, boost ::regex (" " ), " %20" ));
204
204
}
205
205
206
206
Json::Value API::post (std::string addr_path, Json::Value &post_data,
0 commit comments