Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing query params on relative path request #131

Closed
eraac opened this issue Mar 1, 2018 · 5 comments
Closed

Missing query params on relative path request #131

eraac opened this issue Mar 1, 2018 · 5 comments
Assignees
Labels

Comments

@eraac
Copy link

eraac commented Mar 1, 2018

Hello,

I found a weird bug (or maybe an error by me)

I have 2 versions of resty on local

Code for reproduce the error

package main

import "gopkg.in/resty.v1"

func main() {
	c := resty.SetHostURL("https://google.com").SetDebug(true)

	c.R().Get("/test?foo=bar")
}

Query param foo=bar disappears with the latest version of resty, but not with commit 9ac9c42

I think error come from this line:
https://github.com/go-resty/resty/blob/master/middleware.go#L40

@jeevatkm jeevatkm self-assigned this Mar 1, 2018
@jeevatkm
Copy link
Member

jeevatkm commented Mar 1, 2018

@eraac Thanks for reporting it. I will have a look and get back to you.

@jeevatkm jeevatkm added the bug label Mar 1, 2018
@jeevatkm
Copy link
Member

jeevatkm commented Mar 1, 2018

@eraac I believe found the commit which could have caused it.

  • Up to this commit fc8cd45 - working fine
  • And this commit ad03978 onwards - we have an issue

With your sample program. I will work on it and then ping you.

@jeevatkm
Copy link
Member

jeevatkm commented Mar 1, 2018

@eraac Sorry I missed to mention in previous comment. You're correct, issue come from this line. Thanks.

https://github.com/go-resty/resty/blob/master/middleware.go#L40

@jeevatkm jeevatkm added this to the v1.3 Milestone milestone Mar 1, 2018
@jeevatkm jeevatkm changed the title add query param on Get() doesn't work Missing query params on relative path request Mar 1, 2018
@jeevatkm
Copy link
Member

jeevatkm commented Mar 1, 2018

@eraac Issue fixed, again thanks for reporting it.

After PR merge edge version is good to go and also I will be making a v1.3 release and tag today

@jeevatkm
Copy link
Member

jeevatkm commented Mar 1, 2018

Merged 😄

@jeevatkm jeevatkm closed this as completed Mar 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants