HTTP receiver propreties
-
Hi every one
I m trying to use the Http receveir data source for getting data, for my test i m using Google maps API example but nothing happens (Google for API developers : https://developers.google.com/maps/documentation/geocoding/intro#GeocodingResponses )
i setted my point URL as : https://maps.googleapis.com/maps/api/geocode/xml?address=1600+Amphitheatre+Parkway,+Mountain+View/httpds
How can i do for getting the "lat" value for example
Here is the XML respond from google API
{
"results" : [
{
"address_components" : [
{
"long_name" : "1600",
"short_name" : "1600",
"types" : [ "street_number" ]
},
{
"long_name" : "Amphitheatre Pkwy",
"short_name" : "Amphitheatre Pkwy",
"types" : [ "route" ]
},
{
"long_name" : "Mountain View",
"short_name" : "Mountain View",
"types" : [ "locality", "political" ]
},
{
"long_name" : "Santa Clara County",
"short_name" : "Santa Clara County",
"types" : [ "administrative_area_level_2", "political" ]
},
{
"long_name" : "California",
"short_name" : "CA",
"types" : [ "administrative_area_level_1", "political" ]
},
{
"long_name" : "United States",
"short_name" : "US",
"types" : [ "country", "political" ]
},
{
"long_name" : "94043",
"short_name" : "94043",
"types" : [ "postal_code" ]
}
],
"formatted_address" : "1600 Amphitheatre Parkway, Mountain View, CA 94043, USA",
"geometry" : {
"location" : {
"lat" : 37.4224764,
"lng" : -122.0842499
},
"location_type" : "ROOFTOP",
"viewport" : {
"northeast" : {
"lat" : 37.4238253802915,
"lng" : -122.0829009197085
},
"southwest" : {
"lat" : 37.4211274197085,
"lng" : -122.0855988802915
}
}
},
"place_id" : "ChIJ2eUgeAK6j4ARbn5u_wAGqWA",
"types" : [ "street_address" ]
}
],
"status" : "OK"
} -
Hi Amir,
Do you mean the Http Retriever? The Retriever gets a URL and runs Regex on the page returned, while the Receiver is waiting for specifically formatted messages to be sent to it.
If so, the data point configuration you're looking for may be something like...
Data type: Numeric Value RegEx: "lat"[^\d]*(\d+[.]?\d*) Value Capture Group: 1
-
Thanks for your reply,
i will try it soon
-
Thanks phildunlap,
i have tried with success your suggestion
As a beginner Im experimenting now the HTTP publisher in order to send my data to the "Datastore" storage service of Google Cloud, they give a RESTful interface for these application.
but first i didn't find a complete documentation in how mango's publisher works
then i have difficulties to make request for storing my datas, the storage by API REST seems required a double request, one for the authentification and another one for the request.
Thanks you for any help
-
You may find this forum thread useful: http://infiniteautomation.com/forum/topic/2187/how-to-use-publishers-http-sender/3