Creating a GET request with matrix parameters

后端 未结 2 539
心在旅途
心在旅途 2021-01-23 22:39

The webservice I\'ll be using expects matrix parameters:

http://tester.com/v1/customers;lastname=Jackson;firstname=Tim;bookingreference=7Y9UIY

相关标签:
2条回答
  • 2021-01-23 22:57

    UriBuilder and WebTarget of JAX-RS allow to add matrix params.

     UriBuilder builder = ...
     builder.matrixParam("lastname", "Jackson").matrixParam("firstname", "Tim")...
    
    0 讨论(0)
  • 2021-01-23 23:06

    Try with the given().urlEncodingEnabled(false) This resolved my problem . After giving that the matrix parameter issue got resolved and able to hit the service properly

    0 讨论(0)
提交回复
热议问题