BSB Developer Docs
Loading...
Searching...
No Matches
http_method.h File Reference

Utility functions for dealing with HTTP method strings. More...

#include <stdbool.h>

Go to the source code of this file.

Functions

bool http_method_is_valid (const char *method_str)
 Check whether the HTTP method string is valid.
 
void http_method_normalize (char *method_str)
 Normalize the method string in-place.
 

Detailed Description

Utility functions for dealing with HTTP method strings.

Function Documentation

◆ http_method_is_valid()

bool http_method_is_valid ( const char * method_str)

Check whether the HTTP method string is valid.

Parameters
[in]method_strPointer to the zero-terminated method string
Returns
true if the method string is valid, false otherwise

◆ http_method_normalize()

void http_method_normalize ( char * method_str)

Normalize the method string in-place.

Normalization is performed according to https://fetch.spec.whatwg.org/#concept-method-normalize

Parameters
[in,out]method_strPointer to the zero-terminated method string