Golang: AppEngine throws operation not permitted error on Get call

jwesonga

I've written a simple GAE app that does a Get call to an external API but I'm getting a very strange error:

Get http://kenyan-politicians.popit.mysociety.org/api/v0.1/persons/core_person:1290: dial tcp: stat /etc/resolv.conf: operation not permitted

On my dev_appserver it works without any problems. So I'm wondering what could be the problem. I'm not using UrlFetch but my own package http://godoc.org/github.com/johnwesonga/go-mzalendo/mzalendo that uses http.NewRequest and http.DefaultClient.Do

Because of AppEngine restrictions I'm passing my own client to the NewClient call:

func createHttpClient() *http.Client {
    transport := http.Transport{}

    client := &http.Client{
        Transport: &transport,
    }

    return client
}

client := createHttpClient()
c := mzalendo.NewClient(client)
user4752457

On App Engine, you must use a transport created by the urlfetch package. The urlfetch Client function creates a client with an appropriate transport:

func createHttpClient(r *http.Request) *http.Client {
    return urlfetch.Client(appengine.NewContext(r))
}

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

deleting node_modules, get error EPERM operation not permitted

From Dev

Installing rails error: Operation not permitted

From Dev

Installing rails error: Operation not permitted

From Dev

Vagrant Up Error Operation not permitted

From Dev

Bower: Error: EPERM: operation not permitted

From Dev

Cordova error building - EPERM, operation not permitted

From Dev

ICMP pinger application in Python - error: operation not permitted?

From Dev

PhoneGap Error: EPERM: Operation not permitted (windows 10)

From Dev

Operation not permitted error when deleting as root

From Dev

ICMP pinger application in Python - error: operation not permitted?

From Dev

Error: 'Operation not permitted' from both insmod and modprobe

From Dev

Why do I get an "Operation not permitted" error when running duplicity as sudo?

From Dev

Operation not permitted

From Dev

Why do I get ”mount error(1): Operation not permitted“ on ”mount.cifs“ in a LXC container on a Proxmox VE machine?

From Java

warning: Error disabling address space randomization: Operation not permitted

From Java

How to fix "mbind: Operation not permitted" in mysql error log

From Dev

OSError: [Error 1] Operation not permitted shutil.move

From Dev

rails - paperclip error Errno::EPERM (Operation not permitted @ unlink_internal

From Dev

XDP program ip link error: Prog section rejected: Operation not permitted

From Dev

Rust error "PermissionDenied: Operation Not Permitted" when creating pnet datalink channel

From Dev

Error while trying to start PostgreSQL installed via Homebrew: "Operation not permitted"

From Dev

Git clone: error: chmod on <ntfs mount> failed: Operation not permitted

From Dev

rails - paperclip error Errno::EPERM (Operation not permitted @ unlink_internal

From Dev

guestmount inside a lxd container gives an "Operation not permitted" error

From Dev

Operation not permitted error while trying to install pip modules

From Dev

docker Failed to get D-Bus connection: Operation not permitted

From Dev

Docker & nginx operation not permitted

From Dev

npm "operation not permitted"

From Dev

React Native Operation Not Permitted

Related Related

  1. 1

    deleting node_modules, get error EPERM operation not permitted

  2. 2

    Installing rails error: Operation not permitted

  3. 3

    Installing rails error: Operation not permitted

  4. 4

    Vagrant Up Error Operation not permitted

  5. 5

    Bower: Error: EPERM: operation not permitted

  6. 6

    Cordova error building - EPERM, operation not permitted

  7. 7

    ICMP pinger application in Python - error: operation not permitted?

  8. 8

    PhoneGap Error: EPERM: Operation not permitted (windows 10)

  9. 9

    Operation not permitted error when deleting as root

  10. 10

    ICMP pinger application in Python - error: operation not permitted?

  11. 11

    Error: 'Operation not permitted' from both insmod and modprobe

  12. 12

    Why do I get an "Operation not permitted" error when running duplicity as sudo?

  13. 13

    Operation not permitted

  14. 14

    Why do I get ”mount error(1): Operation not permitted“ on ”mount.cifs“ in a LXC container on a Proxmox VE machine?

  15. 15

    warning: Error disabling address space randomization: Operation not permitted

  16. 16

    How to fix "mbind: Operation not permitted" in mysql error log

  17. 17

    OSError: [Error 1] Operation not permitted shutil.move

  18. 18

    rails - paperclip error Errno::EPERM (Operation not permitted @ unlink_internal

  19. 19

    XDP program ip link error: Prog section rejected: Operation not permitted

  20. 20

    Rust error "PermissionDenied: Operation Not Permitted" when creating pnet datalink channel

  21. 21

    Error while trying to start PostgreSQL installed via Homebrew: "Operation not permitted"

  22. 22

    Git clone: error: chmod on <ntfs mount> failed: Operation not permitted

  23. 23

    rails - paperclip error Errno::EPERM (Operation not permitted @ unlink_internal

  24. 24

    guestmount inside a lxd container gives an "Operation not permitted" error

  25. 25

    Operation not permitted error while trying to install pip modules

  26. 26

    docker Failed to get D-Bus connection: Operation not permitted

  27. 27

    Docker & nginx operation not permitted

  28. 28

    npm "operation not permitted"

  29. 29

    React Native Operation Not Permitted

HotTag

Archive