/*
* PackageLicenseDeclared: Apache-2.0
* Copyright (c) 2017 ARM Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* The following class is defined in mbed libraries, in case of STM32H7 include the original library
*/
#if defined __has_include
# if __has_include()
# include
# else
# define NO_HTTP_PARSED
# endif
#endif
#ifdef NO_HTTP_PARSED
#ifndef _MBED_HTTP_PARSED_URL_H_
#define _MBED_HTTP_PARSED_URL_H_
#include "utility/URLParser/http_parser.h"
class ParsedUrl {
public:
ParsedUrl(const char* url) {
struct http_parser_url parsed_url;
http_parser_parse_url(url, strlen(url), false, &parsed_url);
for (size_t ix = 0; ix < UF_MAX; ix++) {
char* value;
if (parsed_url.field_set & (1