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

Internal request parsing methods for fetch functionality. More...

#include <lib/fetch/fetch.h>
#include <lib/jerryscript/amalgam/jerryscript.h>

Go to the source code of this file.

Functions

jerry_value_t js_fetch_request_parse (jerry_value_t obj, FetchRequest *request)
 Parse an incoming JS Request object into its native representation.
 
void js_fetch_request_clear (FetchRequest *request)
 Delete allocated fields inside the request object.
 

Detailed Description

Internal request parsing methods for fetch functionality.

Function Documentation

◆ js_fetch_request_clear()

void js_fetch_request_clear ( FetchRequest * request)

Delete allocated fields inside the request object.

The memory pointed to by the request parameter is not freed.

Parameters
[in,out]requestpointer to the native fetch request to be cleared.

◆ js_fetch_request_parse()

jerry_value_t js_fetch_request_parse ( jerry_value_t obj,
FetchRequest * request )

Parse an incoming JS Request object into its native representation.

Parameters
[in]objvalue representing the input JS object to be parsed
[out]requestpointer to the native fetch request object (must be allocated)
Returns
undefined on success
exception on failure (the exception will contain an error string)