io.vertx.ext.web.api.service

## Class ServiceRequest

- java.lang.Object
- - io.vertx.ext.web.api.service.ServiceRequest

-     public class ServiceRequest
      extends Object

  Data object that encapsulates all informations about an HTTP Request

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ServiceRequest()`
    `ServiceRequest(JsonObject json)`
    `ServiceRequest(JsonObject params, MultiMap headers, JsonObject user, JsonObject extra)`
    `ServiceRequest(ServiceRequest other)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `JsonObject` | `getExtra()` Get extra payload
    `MultiMap` | `getHeaders()` Get request headers
    `JsonObject` | `getParams()` Get request parsedParameters as JSON
    `JsonObject` | `getUser()` Get request principal user as routingContext.user().principal(), null if no user is authenticated
    `ServiceRequest` | `setExtra(JsonObject extra)`
    `ServiceRequest` | `setHeaders(MultiMap headers)`
    `ServiceRequest` | `setParams(JsonObject params)`
    `ServiceRequest` | `setUser(JsonObject user)`
    `JsonObject` | `toJson()`

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

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

- - ### Constructor Detail

    - #### ServiceRequest

          public ServiceRequest()

    - #### ServiceRequest

          public ServiceRequest(JsonObject json)

    - #### ServiceRequest

          public ServiceRequest(JsonObject params,
                                MultiMap headers,
                                JsonObject user,
                                JsonObject extra)

    - #### ServiceRequest

          public ServiceRequest(ServiceRequest other)

  - ### Method Detail

    - #### toJson

          public JsonObject toJson()

    - #### getParams

          public JsonObject getParams()

      Get request parsedParameters as JSON

    - #### getHeaders

          public MultiMap getHeaders()

      Get request headers

    - #### getUser

          public JsonObject getUser()

      Get request principal user as routingContext.user().principal(), null if no user is authenticated

    - #### getExtra

          public JsonObject getExtra()

      Get extra payload
      Returns:

    - #### setParams

          public ServiceRequest setParams(JsonObject params)

    - #### setHeaders

          public ServiceRequest setHeaders(MultiMap headers)

    - #### setUser

          public ServiceRequest setUser(JsonObject user)

    - #### setExtra

          public ServiceRequest setExtra(JsonObject extra)

Copyright © 2025 Eclipse. All rights reserved.