This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ProvidersTree = BuildProvidersTree([ | |
[ProviderOne], | |
[ProviderTwo], | |
[ProviderThree, {data:data}], | |
]); | |
function App(): React.JSX.Element { | |
// something else.. | |
return ( | |
<ProvidersTree /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use rocket::{request::FromRequest, Outcome, Request}; | |
pub struct WWWHost; | |
pub struct AAAHost; | |
impl<'a, 'r> FromRequest<'a, 'r> for WWWHost { | |
type Error = (); | |
fn from_request(request: &'a Request<'r>) -> rocket::request::Outcome<Self, Self::Error> { | |
if let Some(hostname) = request.headers().get_one("host") { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// takes a {} object and returns a FormData object | |
var objectToFormData = function(obj, form, namespace) { | |
var fd = form || new FormData(); | |
var formKey; | |
for(var property in obj) { | |
if(obj.hasOwnProperty(property)) { | |
if(namespace) { |