rapidjs / rapid.js

An ORM-like Interface and a Router For Your API Requests
https://rapidjs.drewjbartlett.com
711 stars 45 forks source link

POST polluted with params from previous GET #30

Closed miljan-aleksic closed 6 years ago

miljan-aleksic commented 6 years ago

Hi, I am using rapid.js v1.0.11 and seems there is a bug.

const query = {...}
Api.withParams(query).all()
  // sending Query string parameters - OK

const data = {...}
Api.withParams(data).post()
  // sending Request Payload - OK
  // sending Query string parameters from previous request - NOT OK

Or perhaps I am missing something...

drewjbartlett commented 6 years ago

@miljan-aleksic can you post a few example urls and also an example of the data passed so I can have a look?

miljan-aleksic commented 6 years ago

Do you have an example jsfiddle or codpen to start from?

drewjbartlett commented 6 years ago

@miljan-aleksic I don't have anything set up. I just wanted to see your issue if possible :)

miljan-aleksic commented 6 years ago

I can't reproduce it in a clean environment. Most likely it was an integration issue. Closing this issue and thanks anyway :)