Skip to content

How to use Fetch API in App Service #351

Answered by silver-zepp
tererun asked this question in Q&A
Discussion options

You must be logged in to vote

You have to modify your code a bit to look like this @tererun:

import { BasePage } from "@zeppos/zml/base-page";

AppService(
    BasePage({
        ...,
        fetchRequest() {
            this.httpRequest({
                    method: 'POST',
                    url: "...",
                    body: {...},
                })
                .then((result) => {
                    ...
                }
        }
}

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
1 reply
@tererun
Comment options

Comment options

You must be logged in to vote
3 replies
@tererun
Comment options

@miguelavh
Comment options

@derekwilson
Comment options

Answer selected by tererun
Comment options

You must be logged in to vote
2 replies
@silver-zepp
Comment options

@derekwilson
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants