Request Class

  • java.lang.Object
    • com.azure.resourcemanager.appservice.models.Request

Implements

public final class Request
implements JsonSerializable<Request>

A request.

Constructor Summary

Constructor Description
Request()

Creates an instance of Request class.

Method Summary

Modifier and Type Method and Description
static Request fromJson(JsonReader jsonReader)

Reads an instance of Request from the JsonReader.

Object headers()

Get the headers property: A list of all the headers attached to the request.

String method()

Get the method property: The HTTP method used for the request.

JsonWriter toJson(JsonWriter jsonWriter)
String uri()

Get the uri property: The destination for the request.

void validate()

Validates the instance.

Request withHeaders(Object headers)

Set the headers property: A list of all the headers attached to the request.

Request withMethod(String method)

Set the method property: The HTTP method used for the request.

Request withUri(String uri)

Set the uri property: The destination for the request.

Methods inherited from java.lang.Object

Constructor Details

Request

public Request()

Creates an instance of Request class.

Method Details

fromJson

public static Request fromJson(JsonReader jsonReader)

Reads an instance of Request from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of Request if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the Request.

headers

public Object headers()

Get the headers property: A list of all the headers attached to the request.

Returns:

the headers value.

method

public String method()

Get the method property: The HTTP method used for the request.

Returns:

the method value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

uri

public String uri()

Get the uri property: The destination for the request.

Returns:

the uri value.

validate

public void validate()

Validates the instance.

withHeaders

public Request withHeaders(Object headers)

Set the headers property: A list of all the headers attached to the request.

Parameters:

headers - the headers value to set.

Returns:

the Request object itself.

withMethod

public Request withMethod(String method)

Set the method property: The HTTP method used for the request.

Parameters:

method - the method value to set.

Returns:

the Request object itself.

withUri

public Request withUri(String uri)

Set the uri property: The destination for the request.

Parameters:

uri - the uri value to set.

Returns:

the Request object itself.

Applies to