@@ -65,12 +65,12 @@ func (t *TestSuite) WebSocketUrl() string {
65
65
// Issue a GET request to the given path and store the result in Request and
66
66
// RequestBody.
67
67
func (t * TestSuite ) Get (path string ) {
68
- t .GetCustom (path ).Send ()
68
+ t .GetCustom (t . BaseUrl () + path ).Send ()
69
69
}
70
70
71
- // Return a GET request to the given path in a form of its wrapper.
72
- func (t * TestSuite ) GetCustom (path string ) * TestRequest {
73
- req , err := http .NewRequest ("GET" , t . BaseUrl () + path , nil )
71
+ // Return a GET request to the given uri in a form of its wrapper.
72
+ func (t * TestSuite ) GetCustom (uri string ) * TestRequest {
73
+ req , err := http .NewRequest ("GET" , uri , nil )
74
74
if err != nil {
75
75
panic (err )
76
76
}
@@ -83,12 +83,12 @@ func (t *TestSuite) GetCustom(path string) *TestRequest {
83
83
// Issue a DELETE request to the given path and store the result in Request and
84
84
// RequestBody.
85
85
func (t * TestSuite ) Delete (path string ) {
86
- t .DeleteCustom (path ).Send ()
86
+ t .DeleteCustom (t . BaseUrl () + path ).Send ()
87
87
}
88
88
89
- // Return a DELETE request to the given path in a form of its wrapper.
90
- func (t * TestSuite ) DeleteCustom (path string ) * TestRequest {
91
- req , err := http .NewRequest ("DELETE" , t . BaseUrl () + path , nil )
89
+ // Return a DELETE request to the given uri in a form of its wrapper.
90
+ func (t * TestSuite ) DeleteCustom (uri string ) * TestRequest {
91
+ req , err := http .NewRequest ("DELETE" , uri , nil )
92
92
if err != nil {
93
93
panic (err )
94
94
}
@@ -101,13 +101,13 @@ func (t *TestSuite) DeleteCustom(path string) *TestRequest {
101
101
// Issue a POST request to the given path, sending the given Content-Type and
102
102
// data, and store the result in Request and RequestBody. "data" may be nil.
103
103
func (t * TestSuite ) Post (path string , contentType string , reader io.Reader ) {
104
- t .PostCustom (path , contentType , reader ).Send ()
104
+ t .PostCustom (t . BaseUrl () + path , contentType , reader ).Send ()
105
105
}
106
106
107
- // Return a POST request to the given path with specified Content-Type and data
107
+ // Return a POST request to the given uri with specified Content-Type and data
108
108
// in a form of wrapper. "data" may be nil.
109
- func (t * TestSuite ) PostCustom (path string , contentType string , reader io.Reader ) * TestRequest {
110
- req , err := http .NewRequest ("POST" , t . BaseUrl () + path , reader )
109
+ func (t * TestSuite ) PostCustom (uri string , contentType string , reader io.Reader ) * TestRequest {
110
+ req , err := http .NewRequest ("POST" , uri , reader )
111
111
if err != nil {
112
112
panic (err )
113
113
}
@@ -121,13 +121,13 @@ func (t *TestSuite) PostCustom(path string, contentType string, reader io.Reader
121
121
// Issue a POST request to the given path as a form post of the given key and
122
122
// values, and store the result in Request and RequestBody.
123
123
func (t * TestSuite ) PostForm (path string , data url.Values ) {
124
- t .PostFormCustom (path , data ).Send ()
124
+ t .PostFormCustom (t . BaseUrl () + path , data ).Send ()
125
125
}
126
126
127
- // Return a POST request to the given path as a form post of the given key and values.
128
- // The request is a wrapper of type TestRequest.
129
- func (t * TestSuite ) PostFormCustom (path string , data url.Values ) * TestRequest {
130
- return t .PostCustom (path , "application/x-www-form-urlencoded" , strings .NewReader (data .Encode ()))
127
+ // Return a POST request to the given uri as a form post of the given key and values.
128
+ // The request is in a form of TestRequest wrapper .
129
+ func (t * TestSuite ) PostFormCustom (uri string , data url.Values ) * TestRequest {
130
+ return t .PostCustom (uri , "application/x-www-form-urlencoded" , strings .NewReader (data .Encode ()))
131
131
}
132
132
133
133
// Issue a multipart request for the method & fields given and read the response.
0 commit comments