This is a migrated thread and some comments may be shown as answers.

Change path of request

1 Answer 316 Views
Windows
This is a migrated thread and some comments may be shown as answers.
Vladimir
Top achievements
Rank 1
Vladimir asked on 07 Feb 2015, 05:10 AM
Hello!

I have a problem with changing path of request.

I have url:
http://54.56.212.65/Test/ServerTest.do?protocol-version=9&client-login=7d29289c8fad51063e9b3c85cc1a69b4
And I need to change IP with a Path to:
http://12.62.52.32/Release/Server.do?protocol-version=9&client-login=7d29289c8fad51063e9b3c85cc1a69b4

But 'client-login' changing every time after request.
So oSession.PathAndQuery not work.
//
        if (oSession.host=="54.56.212.65") {
            oSession.host="12.62.52.32";

        if (oSession.PathAndQuery=="/Release/ServerTest.do") {
            oSession.PathAndQuery = "/Test/Server.do";
//
How can I change only Path and filename without checking values after '.do'?
Doesn't work...
Help please.(


1 Answer, 1 is accepted

Sort by
0
Vladimir
Top achievements
Rank 1
answered on 07 Feb 2015, 05:25 AM
Problem resolved.
I'v used
        if (oSession.host=="54.56.212.65") {
           oSession.PathAndQuery = oSession.PathAndQuery.Replace("Release","Test");
        }
Tags
Windows
Asked by
Vladimir
Top achievements
Rank 1
Answers by
Vladimir
Top achievements
Rank 1
Share this question
or