Skip to content
This repository was archived by the owner on Sep 4, 2021. It is now read-only.
This repository was archived by the owner on Sep 4, 2021. It is now read-only.

API call not working inside worker js file #15

Open

Description

@jitenderchand1

var obj = {method:'POST'}
fetch('http://localhost:3000/',obj).then(function(){
self.postMessage("check");
})

Activity

  1. drudge commented on Oct 25, 2016

    @drudge

    @jitenderchand1 Hard to help with no detail, but here are some things to check:

    • Are you sure you mean localhost? This would mean that you want to access port 3000 on the device
    • If this is android and you are running your http server on your machine, have you used adb reverse tcp:3000 tcp:3000 to make it available on the device?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions