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

iHttp

List of types:

HttpClient
HttpRequest
HttpResponse

HttpClient

iHttp.h
iHttp

Created by b4j on 9/4/14.
Copyright (c) 2014 Anywhere Software. All rights reserved.

Events:

ResponseSuccess (Response As HttpResponse, TaskId As Int)
ResponseError (Response As HttpResponse, Reason As String, StatusCode As Int, TaskId As Int)

Members:


  Execute (Request As HttpRequest, TaskId As Int)

  ExecuteCredentials (Request As HttpRequest, TaskId As Int, UserName As String, Password As String)

  Initialize (EventName As String)

  InitializeAcceptAll (EventName As String)

  IsInitialized As Boolean

Members description:

Execute (Request As HttpRequest, TaskId As Int)
Executes a request in the background. ResponseSuccess or ResponseError events will later be raised.
The TaskId is an optional id that can be used to track requests.
ExecuteCredentials (Request As HttpRequest, TaskId As Int, UserName As String, Password As String)
Similar to Execute. The credentials will be used for basic or digest authentications.
Initialize (EventName As String)
Initializes the object and sets the subs that will handle the events.
InitializeAcceptAll (EventName As String)
Disables the certificates checks. All SSL certificates will be automatically accepted.
This method should only be used in local secured networks.
IsInitialized As Boolean

HttpRequest


Events:

None

Members:


  InitializeDelete (URL As String)

  InitializeGet (URL As String)

  InitializeHead (URL As String)

  InitializePost (URL As String, Dir As String, FileName As String)

  InitializePost2 (URL As String, Data() As Byte)

  InitializePut (URL As String, Dir As String, FileName As String)

  InitializePut2 (URL As String, Data() As Byte)

  IsInitialized As Boolean

  SetContentEncoding (Encoding As String)

  SetContentType (ContentType As String)

  SetHeader (Name As String, Value As String)

  Tag As Object

  Timeout As Int

Members description:

InitializeDelete (URL As String)
Initializes a Http DELETE request.
InitializeGet (URL As String)
Initializes a Http GET request (default type of requests).
InitializeHead (URL As String)
Initializes a Http HEAD request.
InitializePost (URL As String, Dir As String, FileName As String)
Initializes a Http POST request. The specified file will be sent as the request body.
InitializePost2 (URL As String, Data() As Byte)
Initializes a Http POST request. The data will be sent as the request body.
InitializePut (URL As String, Dir As String, FileName As String)
Initializes a Http PUT request. The specified file will be sent as the request body.
InitializePut2 (URL As String, Data() As Byte)
Initializes a Http PUT request. The data will be sent as the request body.
IsInitialized As Boolean
Tests whether this object was initialized.
SetContentEncoding (Encoding As String)
SetContentType (ContentType As String)
SetHeader (Name As String, Value As String)
Sets the request header.
Tag As Object
Gets or sets the Tag object. This is a placeholder for any object you like to tie to this object.
Timeout As Int
Gets or sets the request timeout measured in milliseconds.

HttpResponse


Events:

None

Members:


  ContentEncoding As String [read only]

  ContentLength As Long [read only]

  ContentType As String [read only]

  GetHeaders As Map

  GetInputStream As InputStream

  GetString As String

  GetString2 (CharSet As String) As String

  StatusCode As Int [read only]

Members description:

ContentEncoding As String [read only]
ContentLength As Long [read only]
ContentType As String [read only]
GetHeaders As Map
Returns the response headers as a Map.
GetInputStream As InputStream
Returns an input stream which can be used to read the response.
This method is only valid inside the ResponseSuccess event.
GetString As String
Returns a the server response as a string using UTF8 encoding.
This method is only valid inside the ResponseSuccess event.
GetString2 (CharSet As String) As String
Returns a the server response as a string using the provided encoding.
This method is only valid inside the ResponseSuccess event.
StatusCode As Int [read only]
Gets the server status code.
Top