connection, redirect, url
Constructor and Description |
---|
Post(String url,
byte[] content,
int connectTimeout,
int readTimeout)
Constructor for making POST requests.
|
Modifier and Type | Method and Description |
---|---|
Post |
doConnect()
Makes a connection to the remote resource.
|
static void |
main(String[] args) |
Post |
param(String name,
String value)
Adds a parameter to the request as in a HTML form.
|
Post |
params(String... namesAndValues)
Convenience method to add multiple parameters to the request.
|
basic, basic, bytes, connect, dispose, getInputStream, header, headers, redirect, responseCode, responseMessage, text, text
public Post(String url, byte[] content, int connectTimeout, int readTimeout)
url
- URL of resource.content
- content to be posted to the resource.connectTimeout
- connection timeout.readTimeout
- read timeout.public Post doConnect()
Request
public Post params(String... namesAndValues)
namesAndValues
- names/values of multiple fields to be added to the request.public Post param(String name, String value)
name
- name of parametervalue
- value of parameterpublic static void main(String[] args)
Copyright © 2020 JavaLite. All rights reserved.