Code Monkey home page Code Monkey logo

Comments (7)

h2non avatar h2non commented on May 8, 2024 1

Nah! I try to provide support as much as I can in my OSS projects, but sometimes I'm too busy to do that effectively. More specifically, I was on vacations, mostly travelling for a couple of weeks until today. I'll give you a definitive solution soon ;)

from gock.

h2non avatar h2non commented on May 8, 2024

Thanks for reporting the issue. I'll try to debug that tomorrow and let you know (and also answer you with the other issue you opened).

from gock.

fgblomqvist avatar fgblomqvist commented on May 8, 2024

Ah phew, I thought the project was dying, so glad it's not. It's really the most intuitive http mocker I've found. Thanks a lot for your continued effort!

from gock.

h2non avatar h2non commented on May 8, 2024

I can't reproduce your issue. This is my working test code:

package main

import (
    "fmt"
    "net/http"

    "gopkg.in/h2non/gock.v1"
)

func main() {
    defer gock.Disable()

    gock.New("http://www.espn.com").
        Get("/nfl/player/gamelog/_/id/16733/year/2015/").
        Reply(204)

    res, err := http.Get("http://www.espn.com/nfl/player/gamelog/_/id/16733/year/2015/")
    fmt.Printf("Error: %s\n", err)
    fmt.Printf("Status: %d\n", res.StatusCode)
}

Run it via:

$ go run test.go

from gock.

fgblomqvist avatar fgblomqvist commented on May 8, 2024

Sorry for my lengthy absence. In the end, the fault turned out to lie on my end (mistyped URL). I hope I did not cause too much headache for you. I appreciate your help!

from gock.

h2non avatar h2non commented on May 8, 2024

No problem.

from gock.

yinjianping07 avatar yinjianping07 commented on May 8, 2024

the host you requested is espn.go.com instead of www.espn.com, you can debug to see what happend.

from gock.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.