Coder Social home page Coder Social logo

Raw Data about guzzle HOT 2 CLOSED

guzzle avatar guzzle commented on April 24, 2024
Raw Data

from guzzle.

Comments (2)

mtdowling avatar mtdowling commented on April 24, 2024

Hi Chris,

Are you trying to set a raw body for a put or post request? If so, you can use the setBody() method of an EntityEnclosingRequest object (which is automatically created when calling out or post on a Client object).

-Michael

On Jan 6, 2012, at 11:00 PM, Chris [email protected] wrote:

Feature request: When making a request with the Guzzle\Http\Request object I need the ability to set/get a raw body/query (as a string). Currently (if I understand correctly) it must be a Guzzle\Common\Collection object with key/val pairing.

This is needed (for example) when making a request to many Google APIs. Currently I'm (without Guzzle, want to switch) doing a cURL request setting CURLOPT_POSTFIELDS to a raw json string.


Reply to this email directly or view it on GitHub:
#10

from guzzle.

cboden avatar cboden commented on April 24, 2024

I see. I was using RequestFactory::fromMessage() and receiving a Request object (method was GET).

Showing me the EntityEnclosingRequest object helped me better understand how Guzzle works...I need an EntityEnclosingRequest object from a message string that uses GET. To accomplish this I will extend RequestFactory in my own library and create a method to do this.

I realize what I'm trying to do is a total fringe case. Thank you for your help!

from guzzle.

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.