Class Request
java.lang.Object
org.schabi.newpipe.extractor.downloader.Request
An object that holds request information used when
executing
a request.-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]An optional byte array that will be sent when doing the request, very commonly used inPOSTrequests.
The implementation should make note of some recommended headers (for example,Content-Lengthin a post request).booleangetHeadersFromLocalization(Localization localization) inthashCode()headers()A list of headers that will be used in the request.
Any default headers that the implementation may have, should be overridden by these.A http method (i.e.A localization object that should be used when executing a request.
Usually theAccept-Languagewill be set to this value (a helper method to do this easily:getHeadersFromLocalization(Localization)).static Request.Builderurl()The URL that is pointing to the wanted resource.
-
Constructor Details
-
Request
-
-
Method Details
-
httpMethod
A http method (i.e.GET, POST, HEAD). -
url
The URL that is pointing to the wanted resource. -
headers
A list of headers that will be used in the request.
Any default headers that the implementation may have, should be overridden by these. -
dataToSend
@Nullable public byte[] dataToSend()An optional byte array that will be sent when doing the request, very commonly used inPOSTrequests.
The implementation should make note of some recommended headers (for example,Content-Lengthin a post request). -
localization
A localization object that should be used when executing a request.
Usually theAccept-Languagewill be set to this value (a helper method to do this easily:getHeadersFromLocalization(Localization)). -
newBuilder
-
getHeadersFromLocalization
@Nonnull public static Map<String,List<String>> getHeadersFromLocalization(@Nullable Localization localization) -
equals
-
hashCode
public int hashCode()
-