Class: HTTPResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/response/HTTPResponse.rb,
lib/response/mms/HTTPResponse.rb,
lib/response/sms/HTTPResponse.rb

Instance Method Summary collapse

Constructor Details

#initializeHTTPResponse

Returns a new instance of HTTPResponse.



4
5
6
7
8
9
# File 'lib/response/HTTPResponse.rb', line 4

def initialize
  @code=0
  @content=nil
  @contentType=nil
  @location=nil
end

Instance Method Details

#getCodeObject



30
31
32
# File 'lib/response/HTTPResponse.rb', line 30

def getCode
  @code
end

#getContentObject



38
39
40
# File 'lib/response/HTTPResponse.rb', line 38

def getContent
  @content
end

#getContentTypeObject



46
47
48
# File 'lib/response/HTTPResponse.rb', line 46

def getContentType
  @contentType
end

#getHTTPResponseCodeObject



10
11
12
# File 'lib/response/mms/HTTPResponse.rb', line 10

def getHTTPResponseCode
  @httpResponseCode
end

#getLocationObject



54
55
56
# File 'lib/response/HTTPResponse.rb', line 54

def getLocation
  @location
end

#initializeJSON(jsondict) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/response/HTTPResponse.rb', line 11

def initializeJSON(jsondict)
  @code=0
  if (jsondict!=nil) && (jsondict.has_key?'code') && (jsondict['code']!=nil)
    @code=jsondict['code'].to_i
  end
  @content=nil
  if (jsondict!=nil) && (jsondict.has_key?'content') && (jsondict['content']!=nil)
    @content=jsondict['content']
  end
  @contentType=nil
  if (jsondict!=nil) && (jsondict.has_key?'contentType') && (jsondict['contentType']!=nil)
    @contentType=jsondict['contentType']
  end
  @location=nil
  if (jsondict!=nil) && (jsondict.has_key?'location') && (jsondict['location']!=nil)
    @location=jsondict['location']
  end
end

#setCode(code) ⇒ Object



34
35
36
# File 'lib/response/HTTPResponse.rb', line 34

def setCode(code)
  @code=code
end

#setContent(content) ⇒ Object



42
43
44
# File 'lib/response/HTTPResponse.rb', line 42

def setContent(content)
  @content=content
end

#setContentType(contentType) ⇒ Object



50
51
52
# File 'lib/response/HTTPResponse.rb', line 50

def setContentType(contentType)
  @contentType=contentType
end

#setHTTPResponseCode(httpResponseCode) ⇒ Object



14
15
16
# File 'lib/response/mms/HTTPResponse.rb', line 14

def setHTTPResponseCode(httpResponseCode)
  @httpResponseCode=httpResponseCode
end

#setLocation(location) ⇒ Object



58
59
60
# File 'lib/response/HTTPResponse.rb', line 58

def setLocation(location)
  @location=location
end