Merged branch 'master' into es17.05
This commit is contained in:
@@ -17,15 +17,19 @@ create
|
||||
|
||||
feature {NONE} -- Initialization
|
||||
|
||||
make (a_name: READABLE_STRING_32)
|
||||
make (a_name: READABLE_STRING_GENERAL)
|
||||
-- Create an object with name `a_name'.
|
||||
require
|
||||
a_name_not_empty: not a_name.is_whitespace
|
||||
do
|
||||
name := a_name
|
||||
if attached {READABLE_STRING_32} a_name as n32 then
|
||||
name := n32
|
||||
else
|
||||
name := a_name.to_string_32
|
||||
end
|
||||
initialize
|
||||
ensure
|
||||
name_set: name = a_name
|
||||
name_set: name.same_string_general (a_name)
|
||||
status_not_active: status = not_active
|
||||
end
|
||||
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
<target name="recaptcha">
|
||||
<root all_classes="true"/>
|
||||
<file_rule>
|
||||
<exclude>/.git$</exclude>
|
||||
<exclude>/.svn$</exclude>
|
||||
<exclude>/CVS$</exclude>
|
||||
<exclude>/\.git$</exclude>
|
||||
<exclude>/EIFGENs$</exclude>
|
||||
<exclude>/CVS$</exclude>
|
||||
<exclude>/\.svn$</exclude>
|
||||
</file_rule>
|
||||
<option warning="true">
|
||||
</option>
|
||||
@@ -14,5 +14,7 @@
|
||||
<library name="http_client_extension" location="..\http_client_extension\http_client_extension.ecf"/>
|
||||
<library name="json" location="$ISE_LIBRARY\contrib\library\text\parser\json\library\json.ecf" readonly="false"/>
|
||||
<cluster name="recaptcha" location=".\src\" recursive="true"/>
|
||||
<library name="uri" location="$ISE_LIBRARY\library\text\uri\uri.ecf"/>
|
||||
</cluster>
|
||||
</target>
|
||||
</system>
|
||||
|
||||
@@ -98,26 +98,24 @@ feature {NONE} -- REST API
|
||||
|
||||
get: detachable RESPONSE
|
||||
-- Reading Data
|
||||
local
|
||||
l_request: REQUEST
|
||||
do
|
||||
create l_request.make ("GET", new_uri)
|
||||
Result := l_request.execute
|
||||
Result := (create {REQUEST}.make ("GET", new_uri)).execute
|
||||
end
|
||||
|
||||
feature {NONE} -- Implementation
|
||||
|
||||
new_uri: STRING_8
|
||||
-- new uri (BaseUri?secret=secret_value&response=response_value[&remoteip=remoteip_value]
|
||||
local
|
||||
l_uri: URI
|
||||
do
|
||||
create Result.make_from_string (base_uri)
|
||||
Result.append ("?secret=")
|
||||
Result.append (secret)
|
||||
Result.append ("&response=")
|
||||
Result.append (response)
|
||||
create l_uri.make_from_string (base_uri)
|
||||
l_uri.add_query_parameter ("secret", secret)
|
||||
l_uri.add_query_parameter ("response", response)
|
||||
if attached remoteip as l_remoteip then
|
||||
Result.append ("&remoteip=" + l_remoteip)
|
||||
l_uri.add_query_parameter ("remoteip", l_remoteip)
|
||||
end
|
||||
Result := l_uri.string
|
||||
end
|
||||
|
||||
put_error (a_code: READABLE_STRING_GENERAL)
|
||||
@@ -134,7 +132,7 @@ feature {NONE} -- Implementation
|
||||
end
|
||||
|
||||
note
|
||||
copyright: "2011-2015 Javier Velilla, Jocelyn Fiat, Eiffel Software and others"
|
||||
copyright: "2011-2017 Javier Velilla, Jocelyn Fiat, Eiffel Software and others"
|
||||
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
||||
source: "[
|
||||
Eiffel Software
|
||||
|
||||
Reference in New Issue
Block a user