Android Programming Press on the image to return to the main documentation page.

OkHttpUtils2

List of types:

HttpJob
MultipartFileData

HttpJob

version 2.61
Class module

Events:

None

Members:


  Class_Globals As String

  Complete (id As Int) As String

  Delete (Link As String) As String

  Delete2 (Link As String, Parameters() As String) As String

  Download (Link As String) As String

  Download2 (Link As String, Parameters() As String) As String

  ErrorMessage As String

  GetBitmap As BitmapWrapper

  GetBitmapResize (Width As Int, Height As Int, KeepAspectRatio As Boolean) As BitmapWrapper

  GetBitmapSample (Width As Int, Height As Int) As BitmapWrapper

  GetInputStream As InputStreamWrapper

  GetRequest As OkHttpRequest

  GetString As String

  GetString2 (Encoding As String) As String

  Head (Link As String) As String

  Initialize (Name As String, TargetModule As Object) As String

  IsInitialized As Boolean

  JobName As String

  Password As String

  PatchBytes (Link As String, Data() As Byte) As String

  PatchString (Link As String, Text As String) As String

  PostBytes (Link As String, Data() As Byte) As String

  PostFile (Link As String, Dir As String, FileName As String) As String

  PostMultipart (Link As String, NameValues As Map, Files As List) As String

  PostString (Link As String, Text As String) As String

  PutBytes (Link As String, Data() As Byte) As String

  PutString (Link As String, Text As String) As String

  Release As String

  Success As Boolean

  Tag As Object

  Username As String

Members description:

Class_Globals As String
Complete (id As Int) As String
Called by the service when job completes
Delete (Link As String) As String
Delete2 (Link As String, Parameters() As String) As String
Download (Link As String) As String
Submits a HTTP GET request.
Consider using Download2 if the parameters should be escaped.
Download2 (Link As String, Parameters() As String) As String
Submits a HTTP GET request.
Encodes illegal parameter characters.
Example:
job.Download2("http://www.example.com", _
  Array As String("key1", "value1", "key2", "value2"))

ErrorMessage As String
GetBitmap As BitmapWrapper
Returns the response as a bitmap
GetBitmapResize (Width As Int, Height As Int, KeepAspectRatio As Boolean) As BitmapWrapper
Returns the response as a bitmap loaded LoadBitmapResize.
GetBitmapSample (Width As Int, Height As Int) As BitmapWrapper
Returns the response as a bitmap loaded with LoadBitmapSample.
It is recommended to use GetBitmapResize instead.
GetInputStream As InputStreamWrapper
Returns the response input stream.
GetRequest As OkHttpRequest
Called by the service to get the request
GetString As String
Returns the response as a string encoded with UTF8.
GetString2 (Encoding As String) As String
Returns the response as a string.
Head (Link As String) As String
Sends a HEAD request.
Initialize (Name As String, TargetModule As Object) As String
Initializes the Job.
Name - The job's name. Note that the name doesn't need to be unique.
TargetModule - The activity or service that will handle the JobDone event.
IsInitialized As Boolean
Tests whether the object has been initialized.
JobName As String
Password As String
PatchBytes (Link As String, Data() As Byte) As String
Sends a PATCH request with the given data as the request payload.
PatchString (Link As String, Text As String) As String
Sends a PATCH request with the given string as the request payload.
PostBytes (Link As String, Data() As Byte) As String
Sends a POST request with the given string as the post data
PostFile (Link As String, Dir As String, FileName As String) As String
Sends a POST request with the given file as the post data.
This method doesn't work with assets files.
PostMultipart (Link As String, NameValues As Map, Files As List) As String
Sends a multipart POST request.
NameValues - A map with the keys and values. Pass Null if not needed.
Files - List of MultipartFileData items. Pass Null if not needed.
PostString (Link As String, Text As String) As String
Sends a POST request with the given data as the post data.
PutBytes (Link As String, Data() As Byte) As String
Sends a PUT request with the given string as the post data
PutString (Link As String, Text As String) As String
Sends a PUT request with the given data as the post data.
Release As String
Should be called to free resources held by this job.
Success As Boolean
Tag As Object
Username As String

MultipartFileData


Events:

None

Members:


  ContentType As String

  Dir As String

  FileName As String

  Initialize

  IsInitialized As Boolean

  KeyName As String

Members description:

ContentType As String
Dir As String
FileName As String
Initialize
Initializes the fields to their default value.
IsInitialized As Boolean
Tests whether the object has been initialized.
KeyName As String

Top