Giter Site home page Giter Site logo

Comments (3)

brianr avatar brianr commented on August 17, 2024

GET requests don't have a body, per the HTTP spec. Maybe you are looking for request.params?

from rollbar-gem.

ksdputra avatar ksdputra commented on August 17, 2024

I believe it's request.body.

In postman, it looked like this:
Screenshot 2023-03-20 at 08 44 21

The curl is:

curl --location --request GET 'localhost:3300/partner/check-status' \
--header 'Content-Type: application/json' \
--data '{
	"mto_name": "mastercard",
	"external_id": "93618bea-9cb7-42f1-b379-87e75fa67d63"
}'

I know this is not the best practice, but I am working on legacy code.

So, is there a built-in way to put the request.body of GET request to the payload other than putting in extra?

As an integration engineer who integrates with more than 30 companies, I found many companies that put request.body in GET request. I agree it's not the best practice, but many people still do it.

from rollbar-gem.

brianr avatar brianr commented on August 17, 2024

Huh, TIL!

So you want the request body to appear in the Rollbar UI when an error occurs during a GET request - is that correct?

The relevant part of the rollbar-gem code is: https://github.com/rollbar/rollbar-gem/blob/master/lib/rollbar/request_data_extractor.rb#L31-L64

from rollbar-gem.

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.