Class Request.Builder
java.lang.Object
org.schabi.newpipe.extractor.downloader.Request.Builder
- Enclosing class:
- Request
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddHeaders(String headerName, List<String> headerValueList) automaticLocalizationHeader(boolean automaticLocalizationHeaderToSet) If localization headers should automatically be included in the request.build()dataToSend(byte[] dataToSendToSet) 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).A list of headers that will be used in the request.
Any default headers that the implementation may have, should be overridden by these.httpMethod(String httpMethodToSet) A http method (i.e.localization(Localization localizationToSet) 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:Request.getHeadersFromLocalization(Localization)).setHeaders(String headerName, List<String> headerValueList) The URL that is pointing to the wanted resource.
-
Constructor Details
-
Builder
public Builder()
-
-
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
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:Request.getHeadersFromLocalization(Localization)). -
automaticLocalizationHeader
If localization headers should automatically be included in the request. -
build
-
get
-
head
-
post
-
setHeaders
-
addHeaders
-
setHeader
-
addHeader
-