Coder Social home page Coder Social logo

Response body mocking about dart_nock HOT 3 CLOSED

dricholm avatar dricholm commented on August 11, 2024
Response body mocking

from dart_nock.

Comments (3)

cah4a avatar cah4a commented on August 11, 2024 1

Hey @dricholm!

I've just published v1.1.0 that contains the typo fix.
Sorry for the delay and thanks again for the contribution.

from dart_nock.

cah4a avatar cah4a commented on August 11, 2024

Hi @dricholm!

About reply name, I agree, my bad :) I will add a new method and deprecate replay method.

The main issue about body as an optional parameter is that dart couldn't mix positional and named arguments. And in most cases, there is a body.

What do you think the signature might look like?

from dart_nock.

dricholm avatar dricholm commented on August 11, 2024

Thanks for the quick reply @cah4a!

I see, deprecating the old and adding a new one sounds good.

About the body parameter you have a point, I haven't thought about that. I had a look at the Response class in http, it also uses String body, int statusCode as positional and others such as headers as named parameters. The only idea I have is making the body also named, but since a response with body is used most of the time it is more convenient to leave it as it is now.

from dart_nock.

Related Issues (18)

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.