Creating a GET request with matrix parameters

后端 未结 2 538
心在旅途
心在旅途 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")...
    

提交回复
热议问题