Coder Social home page Coder Social logo

Send JSON or raw body about frisby HOT 8 CLOSED

vlucas avatar vlucas commented on August 29, 2024
Send JSON or raw body

from frisby.

Comments (8)

cboden avatar cboden commented on August 29, 2024 3

If you have the time I think it'd be beneficial to put a snippet of code on the API docs along the lines of:

frisby.create('Post JSON string as body')
    .post('http://httpbin.org/post', {
        arr: [1, 2, 3, 4],
        foo: "bar",
        bar: "baz",
        answer: 42
    }, {json: true})
    .expectHeaderContains('Content-Type', 'json')
.toss()

to show how to set a JSON object as the body as well as the appropriate JSON headers.

from frisby.

cboden avatar cboden commented on August 29, 2024

Found #21

I couldn't find the source to the http://frisbyjs.com site. Is it available? I'd like to make a PR to the documentation on how to do this.

from frisby.

vlucas avatar vlucas commented on August 29, 2024

Unfortunately, the site is currently in a CMS, so that is why the source is not on GitHub. I do want to move it to a static site or GitHub pages, but it has not been done yet.

from frisby.

vlucas avatar vlucas commented on August 29, 2024

This has been added to the bottom of the API documentation page: http://frisbyjs.com/docs/api/

from frisby.

chernetsov avatar chernetsov commented on August 29, 2024

so site is still in CMS? documentation is really incomplete...

from frisby.

vlucas avatar vlucas commented on August 29, 2024

No - the webiste is in hexo (a node.js static site builder) and lives here now: https://github.com/vlucas/frisby-site

from frisby.

cklckl48 avatar cklckl48 commented on August 29, 2024

{ "params":
{ "params1": 1,
"params2": 2}}
If the json raw body like this , how can I do to check this post?

from frisby.

jorgemzz avatar jorgemzz commented on August 29, 2024

I think its because Content-Length: xxx header i missing.
Look at this. http://www.json.org/JSONRequest.html for more details.

from frisby.

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.