Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storage Fetch #1

Open
keycommander opened this issue Jan 30, 2022 · 0 comments
Open

Storage Fetch #1

keycommander opened this issue Jan 30, 2022 · 0 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request question Further information is requested

Comments

@keycommander
Copy link
Owner

keycommander commented Jan 30, 2022

Map.prototype.forEach(theory)

export class DurableObjectExample {
constructor(state, env) {
this.state = state;
}

async fetch(request) {
    let ip = request.headers.get('CF-Connecting-IP');
    let data = await request.text();
    let storagePromise = this.state.storage.put(ip, data);
    await storagePromise;
    return new Response(ip + ' stored ' + data);
}

}

@keycommander keycommander self-assigned this Sep 12, 2023
@keycommander keycommander added bug Something isn't working enhancement New feature or request question Further information is requested labels Sep 12, 2023
@keycommander keycommander changed the title Durable Storage Fetch Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant