Package org.apache.solr.client.solrj.request

## Class GenericV2SolrRequest

- java.lang.Object
- - org.apache.solr.client.solrj.SolrRequest<SimpleSolrResponse>
  - - org.apache.solr.client.solrj.request.GenericSolrRequest
    - - org.apache.solr.client.solrj.request.GenericV2SolrRequest

All Implemented Interfaces:
  `Serializable`

    public class GenericV2SolrRequest
    extends GenericSolrRequest

A `GenericSolrRequest` implementation intended for v2 APIs

See Also:
  Serialized Form

### Nested Class Summary

### Nested classes/interfaces inherited from class org.apache.solr.client.solrj.SolrRequest

`SolrRequest.ApiVersion, SolrRequest.METHOD, SolrRequest.SolrClientContext, SolrRequest.SolrRequestType`

### Field Summary

### Fields inherited from class org.apache.solr.client.solrj.request.GenericSolrRequest

`contentWriter, params, requiresCollection, response`

### Fields inherited from class org.apache.solr.client.solrj.SolrRequest

`SUPPORTED_METHODS, useBinaryV2, usev2`

### Constructor Summary

Constructors
`GenericV2SolrRequest​(SolrRequest.METHOD m, String path)`
`GenericV2SolrRequest​(SolrRequest.METHOD m, String path, SolrParams params)`

### Method Summary

All Methods Instance Methods Concrete Methods
`SolrRequest.ApiVersion` `getApiVersion()` Indicates which API version this request will make

### Methods inherited from class org.apache.solr.client.solrj.request.GenericSolrRequest

`createResponse, getContentWriter, getParams, getRequestType, requiresCollection, setContentWriter, setRequiresCollection, withContent`

### Methods inherited from class org.apache.solr.client.solrj.SolrRequest

`addHeader, addHeaders, getBasePath, getBasicAuthPassword, getBasicAuthUser, getCollection, getContentStreams, getHeaders, getMethod, getPath, getPreferredNodes, getQueryParams, getResponseParser, getStreamingResponseCallback, getUserPrincipal, process, process, setBasePath, setBasicAuthCredentials, setMethod, setPath, setPreferredNodes, setQueryParams, setResponseParser, setStreamingResponseCallback, setUseBinaryV2, setUserPrincipal, setUseV2`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### GenericV2SolrRequest

    public GenericV2SolrRequest​(SolrRequest.METHOD m,
                                String path)

Parameters:
  `m` - the HTTP method to use for this request
  `path` - the HTTP path to use for this request. Path may include the v2 API root path (i.e. "/api"), but does not need to. If users are making a collection-aware request (i.e. `GenericSolrRequest.setRequiresCollection(boolean)` is called with 'true'), only the section of the API path following the collection or core should be provided here.

#### GenericV2SolrRequest

    public GenericV2SolrRequest​(SolrRequest.METHOD m,
                                String path,
                                SolrParams params)

Parameters:
  `m` - the HTTP method to use for this request
  `path` - the HTTP path to use for this request. If users are making a collection-aware request (i.e. `GenericSolrRequest.setRequiresCollection(boolean)` is called with 'true'), only the section of the API path following the collection or core should be provided here.
  `params` - query parameter names and values for making this request.

### Method Detail

#### getApiVersion

    public SolrRequest.ApiVersion getApiVersion()

Description copied from class: `SolrRequest`
Indicates which API version this request will make

Defaults implementation returns 'V1'.

Overrides:
  `getApiVersion` in class `SolrRequest<SimpleSolrResponse>`