Getting java.net.URISyntaxException: Illegal character in path at index 7: http:/$Bearer









up vote
0
down vote

favorite












I have an API name loginUser, which generates the authorization Token, that is to be passed in other subsequent APIs.



Below is the response:-



HTTP/1.1 200 OK
Date: Sat, 10 Nov 2018 07:08:45 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 71
Connection: keep-alive
Server: nginx/1.10.3 (Ubuntu)
X-Powered-By: Express
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: date, authorization, x-powered-by, connection, server, access-control-allow-origin, content-type, content-length, x-final-url
authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIyYmEyYjc1My03NWEwLTQxNGYtYWFiOC0zZGY1M2I4YmIwMDEiLCJpc0Nvb2siOnRydWUsImlhdCI6MTU0MTgzMzcyNX0.3FRVpHm4EF2Ahzzy-OjbZ2EeZto6-hSFKHNtG5wcjBs



Where I want to fetch the authorization.



I'm using Regular Expression Extractor, but it is throwing below error (URISyntaxException: illegal character in the path)



Snapshots:-



Step_1



Step_2



Step_3



Step_4



I have seen couple of queries related to this Error but not in Jmeter,
And i tried using % also, to get rid out of this error, but that didn't work out.



Thanks in advance.










share|improve this question



























    up vote
    0
    down vote

    favorite












    I have an API name loginUser, which generates the authorization Token, that is to be passed in other subsequent APIs.



    Below is the response:-



    HTTP/1.1 200 OK
    Date: Sat, 10 Nov 2018 07:08:45 GMT
    Content-Type: application/json; charset=utf-8
    Content-Length: 71
    Connection: keep-alive
    Server: nginx/1.10.3 (Ubuntu)
    X-Powered-By: Express
    Access-Control-Allow-Origin: *
    Access-Control-Expose-Headers: date, authorization, x-powered-by, connection, server, access-control-allow-origin, content-type, content-length, x-final-url
    authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIyYmEyYjc1My03NWEwLTQxNGYtYWFiOC0zZGY1M2I4YmIwMDEiLCJpc0Nvb2siOnRydWUsImlhdCI6MTU0MTgzMzcyNX0.3FRVpHm4EF2Ahzzy-OjbZ2EeZto6-hSFKHNtG5wcjBs



    Where I want to fetch the authorization.



    I'm using Regular Expression Extractor, but it is throwing below error (URISyntaxException: illegal character in the path)



    Snapshots:-



    Step_1



    Step_2



    Step_3



    Step_4



    I have seen couple of queries related to this Error but not in Jmeter,
    And i tried using % also, to get rid out of this error, but that didn't work out.



    Thanks in advance.










    share|improve this question

























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I have an API name loginUser, which generates the authorization Token, that is to be passed in other subsequent APIs.



      Below is the response:-



      HTTP/1.1 200 OK
      Date: Sat, 10 Nov 2018 07:08:45 GMT
      Content-Type: application/json; charset=utf-8
      Content-Length: 71
      Connection: keep-alive
      Server: nginx/1.10.3 (Ubuntu)
      X-Powered-By: Express
      Access-Control-Allow-Origin: *
      Access-Control-Expose-Headers: date, authorization, x-powered-by, connection, server, access-control-allow-origin, content-type, content-length, x-final-url
      authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIyYmEyYjc1My03NWEwLTQxNGYtYWFiOC0zZGY1M2I4YmIwMDEiLCJpc0Nvb2siOnRydWUsImlhdCI6MTU0MTgzMzcyNX0.3FRVpHm4EF2Ahzzy-OjbZ2EeZto6-hSFKHNtG5wcjBs



      Where I want to fetch the authorization.



      I'm using Regular Expression Extractor, but it is throwing below error (URISyntaxException: illegal character in the path)



      Snapshots:-



      Step_1



      Step_2



      Step_3



      Step_4



      I have seen couple of queries related to this Error but not in Jmeter,
      And i tried using % also, to get rid out of this error, but that didn't work out.



      Thanks in advance.










      share|improve this question















      I have an API name loginUser, which generates the authorization Token, that is to be passed in other subsequent APIs.



      Below is the response:-



      HTTP/1.1 200 OK
      Date: Sat, 10 Nov 2018 07:08:45 GMT
      Content-Type: application/json; charset=utf-8
      Content-Length: 71
      Connection: keep-alive
      Server: nginx/1.10.3 (Ubuntu)
      X-Powered-By: Express
      Access-Control-Allow-Origin: *
      Access-Control-Expose-Headers: date, authorization, x-powered-by, connection, server, access-control-allow-origin, content-type, content-length, x-final-url
      authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIyYmEyYjc1My03NWEwLTQxNGYtYWFiOC0zZGY1M2I4YmIwMDEiLCJpc0Nvb2siOnRydWUsImlhdCI6MTU0MTgzMzcyNX0.3FRVpHm4EF2Ahzzy-OjbZ2EeZto6-hSFKHNtG5wcjBs



      Where I want to fetch the authorization.



      I'm using Regular Expression Extractor, but it is throwing below error (URISyntaxException: illegal character in the path)



      Snapshots:-



      Step_1



      Step_2



      Step_3



      Step_4



      I have seen couple of queries related to this Error but not in Jmeter,
      And i tried using % also, to get rid out of this error, but that didn't work out.



      Thanks in advance.







      regex jmeter






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 10 at 14:46









      user7294900

      19.3k93157




      19.3k93157










      asked Nov 10 at 7:45









      shank

      83




      83






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote



          accepted










          Authorization is sent/receive in headers,



          Change Step 2, Field to check should be Response Headers to get the value






          share|improve this answer




















          • Thanks for the answer, but after changing that i am getting below error in View Results Tree.
            – shank
            Nov 10 at 14:18











          • org.apache.http.client.ClientProtocolException: URI does not specify a valid host name: http:/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIyYmEyYjc1My03NWEwLTQxNGYtYWFiOC0zZGY1M2I4YmIwMDEiLCJpc0Nvb2siOnRydWUsImlhdCI6MTU0MTg1ODc4NX0.KgwnC9UoYifFuBZO7opjKH2pQfM4k-_N_8McsUyRtMI at org.apache.http.impl.client.CloseableHttpClient.determineTarget(CloseableHttpClient.java:95)
            – shank
            Nov 10 at 14:20










          • @shank Step 3 you might be to pass Bearer in HTTP Header of the request instead of its path
            – user7294900
            Nov 10 at 14:45











          • Thanks again, now getting this below error:-
            – shank
            Nov 10 at 16:24










          • java.net.MalformedURLException: unknown protocol: eyjhbgcioijiuzi1niisinr5cci6ikpxvcj9.eyj1c2vyswqioiiyymeyyjc1my03nwewltqxngytywfioc0zzgy1m2i4ymiwmdeilcjpc0nvb2sionrydwusimlhdci6mtu0mtg2njk4nn0.182foo90hnmmbsdwjqxdo7_zwuefpnqzg0vlyfmgbom at java.net.URL.<init>(URL.java:421) at java.net.URL.<init>(URL.java:310)
            – shank
            Nov 10 at 16:25










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53237006%2fgetting-java-net-urisyntaxexception-illegal-character-in-path-at-index-7-http%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote



          accepted










          Authorization is sent/receive in headers,



          Change Step 2, Field to check should be Response Headers to get the value






          share|improve this answer




















          • Thanks for the answer, but after changing that i am getting below error in View Results Tree.
            – shank
            Nov 10 at 14:18











          • org.apache.http.client.ClientProtocolException: URI does not specify a valid host name: http:/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIyYmEyYjc1My03NWEwLTQxNGYtYWFiOC0zZGY1M2I4YmIwMDEiLCJpc0Nvb2siOnRydWUsImlhdCI6MTU0MTg1ODc4NX0.KgwnC9UoYifFuBZO7opjKH2pQfM4k-_N_8McsUyRtMI at org.apache.http.impl.client.CloseableHttpClient.determineTarget(CloseableHttpClient.java:95)
            – shank
            Nov 10 at 14:20










          • @shank Step 3 you might be to pass Bearer in HTTP Header of the request instead of its path
            – user7294900
            Nov 10 at 14:45











          • Thanks again, now getting this below error:-
            – shank
            Nov 10 at 16:24










          • java.net.MalformedURLException: unknown protocol: eyjhbgcioijiuzi1niisinr5cci6ikpxvcj9.eyj1c2vyswqioiiyymeyyjc1my03nwewltqxngytywfioc0zzgy1m2i4ymiwmdeilcjpc0nvb2sionrydwusimlhdci6mtu0mtg2njk4nn0.182foo90hnmmbsdwjqxdo7_zwuefpnqzg0vlyfmgbom at java.net.URL.<init>(URL.java:421) at java.net.URL.<init>(URL.java:310)
            – shank
            Nov 10 at 16:25














          up vote
          0
          down vote



          accepted










          Authorization is sent/receive in headers,



          Change Step 2, Field to check should be Response Headers to get the value






          share|improve this answer




















          • Thanks for the answer, but after changing that i am getting below error in View Results Tree.
            – shank
            Nov 10 at 14:18











          • org.apache.http.client.ClientProtocolException: URI does not specify a valid host name: http:/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIyYmEyYjc1My03NWEwLTQxNGYtYWFiOC0zZGY1M2I4YmIwMDEiLCJpc0Nvb2siOnRydWUsImlhdCI6MTU0MTg1ODc4NX0.KgwnC9UoYifFuBZO7opjKH2pQfM4k-_N_8McsUyRtMI at org.apache.http.impl.client.CloseableHttpClient.determineTarget(CloseableHttpClient.java:95)
            – shank
            Nov 10 at 14:20










          • @shank Step 3 you might be to pass Bearer in HTTP Header of the request instead of its path
            – user7294900
            Nov 10 at 14:45











          • Thanks again, now getting this below error:-
            – shank
            Nov 10 at 16:24










          • java.net.MalformedURLException: unknown protocol: eyjhbgcioijiuzi1niisinr5cci6ikpxvcj9.eyj1c2vyswqioiiyymeyyjc1my03nwewltqxngytywfioc0zzgy1m2i4ymiwmdeilcjpc0nvb2sionrydwusimlhdci6mtu0mtg2njk4nn0.182foo90hnmmbsdwjqxdo7_zwuefpnqzg0vlyfmgbom at java.net.URL.<init>(URL.java:421) at java.net.URL.<init>(URL.java:310)
            – shank
            Nov 10 at 16:25












          up vote
          0
          down vote



          accepted







          up vote
          0
          down vote



          accepted






          Authorization is sent/receive in headers,



          Change Step 2, Field to check should be Response Headers to get the value






          share|improve this answer












          Authorization is sent/receive in headers,



          Change Step 2, Field to check should be Response Headers to get the value







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 10 at 10:16









          user7294900

          19.3k93157




          19.3k93157











          • Thanks for the answer, but after changing that i am getting below error in View Results Tree.
            – shank
            Nov 10 at 14:18











          • org.apache.http.client.ClientProtocolException: URI does not specify a valid host name: http:/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIyYmEyYjc1My03NWEwLTQxNGYtYWFiOC0zZGY1M2I4YmIwMDEiLCJpc0Nvb2siOnRydWUsImlhdCI6MTU0MTg1ODc4NX0.KgwnC9UoYifFuBZO7opjKH2pQfM4k-_N_8McsUyRtMI at org.apache.http.impl.client.CloseableHttpClient.determineTarget(CloseableHttpClient.java:95)
            – shank
            Nov 10 at 14:20










          • @shank Step 3 you might be to pass Bearer in HTTP Header of the request instead of its path
            – user7294900
            Nov 10 at 14:45











          • Thanks again, now getting this below error:-
            – shank
            Nov 10 at 16:24










          • java.net.MalformedURLException: unknown protocol: eyjhbgcioijiuzi1niisinr5cci6ikpxvcj9.eyj1c2vyswqioiiyymeyyjc1my03nwewltqxngytywfioc0zzgy1m2i4ymiwmdeilcjpc0nvb2sionrydwusimlhdci6mtu0mtg2njk4nn0.182foo90hnmmbsdwjqxdo7_zwuefpnqzg0vlyfmgbom at java.net.URL.<init>(URL.java:421) at java.net.URL.<init>(URL.java:310)
            – shank
            Nov 10 at 16:25
















          • Thanks for the answer, but after changing that i am getting below error in View Results Tree.
            – shank
            Nov 10 at 14:18











          • org.apache.http.client.ClientProtocolException: URI does not specify a valid host name: http:/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIyYmEyYjc1My03NWEwLTQxNGYtYWFiOC0zZGY1M2I4YmIwMDEiLCJpc0Nvb2siOnRydWUsImlhdCI6MTU0MTg1ODc4NX0.KgwnC9UoYifFuBZO7opjKH2pQfM4k-_N_8McsUyRtMI at org.apache.http.impl.client.CloseableHttpClient.determineTarget(CloseableHttpClient.java:95)
            – shank
            Nov 10 at 14:20










          • @shank Step 3 you might be to pass Bearer in HTTP Header of the request instead of its path
            – user7294900
            Nov 10 at 14:45











          • Thanks again, now getting this below error:-
            – shank
            Nov 10 at 16:24










          • java.net.MalformedURLException: unknown protocol: eyjhbgcioijiuzi1niisinr5cci6ikpxvcj9.eyj1c2vyswqioiiyymeyyjc1my03nwewltqxngytywfioc0zzgy1m2i4ymiwmdeilcjpc0nvb2sionrydwusimlhdci6mtu0mtg2njk4nn0.182foo90hnmmbsdwjqxdo7_zwuefpnqzg0vlyfmgbom at java.net.URL.<init>(URL.java:421) at java.net.URL.<init>(URL.java:310)
            – shank
            Nov 10 at 16:25















          Thanks for the answer, but after changing that i am getting below error in View Results Tree.
          – shank
          Nov 10 at 14:18





          Thanks for the answer, but after changing that i am getting below error in View Results Tree.
          – shank
          Nov 10 at 14:18













          org.apache.http.client.ClientProtocolException: URI does not specify a valid host name: http:/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIyYmEyYjc1My03NWEwLTQxNGYtYWFiOC0zZGY1M2I4YmIwMDEiLCJpc0Nvb2siOnRydWUsImlhdCI6MTU0MTg1ODc4NX0.KgwnC9UoYifFuBZO7opjKH2pQfM4k-_N_8McsUyRtMI at org.apache.http.impl.client.CloseableHttpClient.determineTarget(CloseableHttpClient.java:95)
          – shank
          Nov 10 at 14:20




          org.apache.http.client.ClientProtocolException: URI does not specify a valid host name: http:/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIyYmEyYjc1My03NWEwLTQxNGYtYWFiOC0zZGY1M2I4YmIwMDEiLCJpc0Nvb2siOnRydWUsImlhdCI6MTU0MTg1ODc4NX0.KgwnC9UoYifFuBZO7opjKH2pQfM4k-_N_8McsUyRtMI at org.apache.http.impl.client.CloseableHttpClient.determineTarget(CloseableHttpClient.java:95)
          – shank
          Nov 10 at 14:20












          @shank Step 3 you might be to pass Bearer in HTTP Header of the request instead of its path
          – user7294900
          Nov 10 at 14:45





          @shank Step 3 you might be to pass Bearer in HTTP Header of the request instead of its path
          – user7294900
          Nov 10 at 14:45













          Thanks again, now getting this below error:-
          – shank
          Nov 10 at 16:24




          Thanks again, now getting this below error:-
          – shank
          Nov 10 at 16:24












          java.net.MalformedURLException: unknown protocol: eyjhbgcioijiuzi1niisinr5cci6ikpxvcj9.eyj1c2vyswqioiiyymeyyjc1my03nwewltqxngytywfioc0zzgy1m2i4ymiwmdeilcjpc0nvb2sionrydwusimlhdci6mtu0mtg2njk4nn0.182foo90hnmmbsdwjqxdo7_zwuefpnqzg0vlyfmgbom at java.net.URL.<init>(URL.java:421) at java.net.URL.<init>(URL.java:310)
          – shank
          Nov 10 at 16:25




          java.net.MalformedURLException: unknown protocol: eyjhbgcioijiuzi1niisinr5cci6ikpxvcj9.eyj1c2vyswqioiiyymeyyjc1my03nwewltqxngytywfioc0zzgy1m2i4ymiwmdeilcjpc0nvb2sionrydwusimlhdci6mtu0mtg2njk4nn0.182foo90hnmmbsdwjqxdo7_zwuefpnqzg0vlyfmgbom at java.net.URL.<init>(URL.java:421) at java.net.URL.<init>(URL.java:310)
          – shank
          Nov 10 at 16:25

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53237006%2fgetting-java-net-urisyntaxexception-illegal-character-in-path-at-index-7-http%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          How to how show current date and time by default on contact form 7 in WordPress without taking input from user in datetimepicker

          Syphilis

          Darth Vader #20