HTTP RAW Request not working - jmeter

I am using JMeter 4.0, this time I use HTTP RAW request, but it is not showing the proper response, my actual response message is success. I am also using HTTP Cookie manager.
Is it required to put Cookie: JSESSIONID in HTTP RAW request page as Request Data? If yes, then how will I do it? It is showing at Sample Request not in response body.
Sampler Result
Thread Name: Thread Group 1-1
Sample Start: 2018-05-15 18:30:14 IST`enter code here
Load time: 20014
Connect Time: 0
Latency: 10
Size in bytes: 2
Sent bytes:0
Headers size in bytes: 0
Body size in bytes: 2
Sample Count: 1
Error Count: 0
Data type ("text"|"bin"|""): text
Response code: 401
Response message: Unauthorized
Response headers:
Server: Apache-Coyote/1.1
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY Set-Cookie: JSESSIONID=A1928A9F41209E241F4ABAFB6DC515E9; Path=/bbbp/; HttpOnly
WWW-Authenticate: Basic realm="Realm"
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Date: Tue, 15 May 2018 12:54:07 GMT
SampleResult fields:
ContentType:
DataEncoding: null
Request
POST /bbbp/api/uploadFiles HTTP/1.1
Host: devserver.sdrc.co.in
Connection: keep-alive
Content-Length: 25358
Accept: application/json, text/plain, */*
Origin: http://devserver.sdrc.co.in:8080
X-Requested-With: XMLHttpRequest
Content-Type: Type: application/json
Referer: http://devserver.sdrc.co.in:8080/bbbp/data-entry-awareness
User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36
Accept-Language: en-GB,en-US;q=0.9,en;q=0.8
Accept-Encoding: gzip, deflate
Response data
a2

Related

Getting 401 Response Code in Jmeter when I tried to see the View Result

Am getting 401 Response code while running my Jmeter script. Here is the sample result, request headers, response body, response headers.
Sample Result:
Thread Name:Thread Group 1-1
Sample Start:2022-05-04 20:13:44 IST
Load time:226
Connect Time:0
Latency:226
Size in bytes:591
Sent bytes:876
Headers size in bytes:417
Body size in bytes:174
Sample Count:1
Error Count:1
Data type ("text"|"bin"|""):text
Response code:401
Response message:
Request Headers:
Connection: keep-alive
Authorization: Bearer 0rPuk9bYwyE=ZXlKaGJHY2lPaUpJVXpVeE1pSjkuZXlKemRXSWlPaUpPWVhabFpXNTJaV3h3ZFhKcFFHZHZZWFZrYVhSekxtTnZiU0lzSW1saGRDSTZNVFkxTVRZMk9EZzBNQ3dpWlhod0lqb3hOalV4TnpZNE9EUXdMQ0pxZEdraU9pSmxOREF4WlRZNU1pMWxPVFJtTFRRd01XWXRPR0psTlMwMU1tRXdaR1ptTkdSaFpUVWlMQ0pwYzNNaU9pSXpOamN3TURjMVppMWpZemhpTFRRd1lURXRZakEwT1MxbE4yVXhZMlkxWW1GaFpXVWlmUS5KQjdBOUdyS1I0bWE3N1VieXcySm5xZ3RuQjJJdHR6WVVJWTBZcU13Z1Ztb3AxeXpsNkpzRHF2NDlpVHAwTHhDN1JqNXRPT1dWSnFUeWs5bW5BZTkxUQ==
Referer: http://18.133.204.151/
Accept-Language: en-US,en;q=0.5
Origin: http://18.133.204.151
Content-Type: application/json
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:99.0) Gecko/20100101 Firefox/99.0
Accept: application/json
Content-Length: 2
Host: 18.133.204.151:8080
Response Body:
{"timestamp":"2022-05-04T14:43:44.476+0000","status":401,"error":"Unauthorized","message":"Error -> Unauthorized","path":"/webapp/api/audits/schedule/status/list"}
Response Headers:
HTTP/1.1 401
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Access-Control-Allow-Origin: *
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Type: application/json
Transfer-Encoding: chunked
Date: Wed, 04 May 2022 14:43:44 GMT
Can someone please help me in resolving the issue. I tried in many ways and nothing helping me in resolving this.
Thanks in advance.
As per 401 Unauthorized status code description:
401 Unauthorized
The HyperText Transfer Protocol (HTTP) 401 Unauthorized response status code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource.
If this Bearer token is recorded you won't be able to replay the request successfully because the token needs to be correlated. Check out Using Regular Expressions to Extract Tokens and Session IDs to Variables article for example solution (you might need to amend it to your application specifics)

Browser auth popup not showing up in case of ajax cors with basic authentication request

From a web page of domain A, I am firing up an ajax request to domain B in order to get JSON for which basic auth is configured on domain B. I have access to the code on both the domains. I configured the all the required CORS header on domain B (Even made Access-Control-Allow-Origin header value specific and not "*", after reading some stackoverflow) What I am expecting is browser basic auth pop up, But POST request just fails with 401.I can see that server has responded with expected response header for PRE-FLIGHT OPTION request, below the request & response headers of the OPTION & actual POST method call that happens
***OPTION REQUEST***
Host: DOMAIN_B:8085
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Access-Control-Request-Method: POST
Access-Control-Request-Headers: x-requested-with
Referer: http://DOMAIN_A:2280/app/
Origin: http://DOMAIN_A:2280
Connection: keep-alive
***OPTION RESPONSE***
HTTP/1.1 200 OK
X-Powered-By: Express
Access-Control-Allow-Origin: http://DOMAIN_A:2280
Vary: Origin
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET,HEAD,PUT,PATCH,POST,DELETE
Access-Control-Allow-Headers: Content-Type,Authorization,x-requested-with
Access-Control-Max-Age: 1
Allow: GET,POST
Content-Type: text/html; charset=utf-8
Content-Length: 8
Date: Fri, 04 Jan 2019 12:48:48 GMT
Connection: keep-alive
*** ACTUAL POST REQUEST***
Host: DOMAIN_B:8085
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://DOMAIN_A:2280/app/
X-Requested-With: XMLHttpRequest
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Content-Length: 105
Origin: http://DOMAIN_A:2280
Connection: keep-alive
*** ACTUAL POST REQUEST***
HTTP/1.1 401 Unauthorized
X-Powered-By: Express
Vary: X-HTTP-Method-Override, Origin
Access-Control-Allow-Origin: http://DOMAIN_A:2280
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: POST,GET,PUT,DELETE
Access-Control-Allow-Headers: Content-Type,Authorization,x-requested-with
Access-Control-Max-Age: 1
WWW-Authenticate: Basic realm=artist
Content-Type: text/plain; charset=utf-8
Content-Length: 12
Date: Fri, 04 Jan 2019 12:48:48 GMT
Connection: keep-alive
So its expected that browser looking at the response of the POST call(401 HTTP code & WWW-Authenticate header) should get prompted to show the native authentication pop up, But it's not doing so. I am not sure what I am doing wrong here. Showing custom form to capture the credential and passing them in "Authorization" header using btoa function is not an option
Appreciate any help, I am ripping my hair apart here!!!
use basic-auth npm plugin
const auth = require('basic-auth');
app.use(function (request, response, next) {
var user = auth(request);
console.log("user => ",user);
if (!user || !user.name || !user.pass) {
response.set('WWW-Authenticate', 'Basic realm="example"');
return response.status(401).send();
}
return next();
});

JMETER ERROR: {"errorcode":9999,"errormessage":"Unexpected token % in JSON at position 0"}

I am running a test and on running it after co-relating sessionid, I am getting the following below error in "response data" tab in "view results tree listener".
Can you please help me fix this error:
Sampler Result:
Thread Name: Xaas_No 1-1
Sample Start: 2018-06-14 14:57:20 IST
Load time: 1731
Connect Time: 1255
Latency: 1730
Size in bytes: 852
Sent bytes:957
Headers size in bytes: 776
Body size in bytes: 76
Sample Count: 1
Error Count: 1
Data type ("text"|"bin"|""): text
Response code: 500
Response message: Internal Server Error
Response headers:
HTTP/1.1 500 Internal Server Error
x-powered-by: Express
content-type: application/json; charset=utf-8
content-length: 76
etag: W/"4c-gdbCiVcDg5gx+63/uawAq4eRIu0"
date: Thu, 14 Jun 2018 09:27:12 GMT
connection: close
Set-Cookie: BIGipServeriapxaasbotbuildertest.accenture.com-443=1932329994.47873.0000;Path=/;Version=1;Secure;Httponly
Content-Security-Policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' *.accenture.com; script-src 'self' 'unsafe-inline' 'unsafe-eval'; img-src 'self' *.accenture.com data:; connect-src 'self' *.accenture.com *.dialogflow.com
Cache-Control: private; max-age=31536000
Strict-Transport-Security: max-age=31536000;includeSubDomains
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
HTTPSampleResult fields:
ContentType: application/json; charset=utf-8
DataEncoding: utf-8
Request:
POST https://iapxaasbotbuildertest.accenture.com/channelService/channelWeb/619e81efe7
POST data:
%7B%22entry%22%3A%5B%7B%22sessionid%22%3A%22%22%2C%22tenantid%22%3A%22619e81efe7%22%2C%22botid%22%3A%229bb95dfba0%22%2C%22channel%22%3A%22Web%22%2C%22messaging%22%3A%5B%7B%22message%22%3A%7B%22messageId%22%3A123%2C%22text%22%3A%22hi%22%2C%22timestamp%22%3A1528967999992%7D%2C%22sender%22%3A%7B%22id%22%3A%22USR12%22%2C%22name%22%3A%22sylvin%22%7D%7D%5D%7D%5D%7D=
[no cookies]
Request Headers:
Connection: keep-alive
Origin: https://iapxaasbotbuildertest.accenture.com
Accept: application/json, text/plain, */*
Referer: https://iapxaasbotbuildertest.accenture.com/demo/webtest/?tenantID=619e81efe7&botID=9bb95dfba0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36 managedpc (Accenture)
Accept-Language: en-US,en;q=0.9
Accept-Encoding: gzip, deflate, br
Content-Type: application/json
Content-Length: 362
Host: iapxaasbotbuildertest.accenture.com
Response data:
{ "errorcode": 9999, "errormessage": "Unexpected token % in JSON
at position 0" }
You should not be encoding your JSON payload, it should go as it is
So make sure to uncheck "Encode" box in your HTTP Request sampler
Also make sure to add HTTP Cookie Manager to your Test Plan as you seem to be receiving some cookies but not sending them back.
See REST API Testing - How to Do it Right article for more information if needed.

JMeter recorded sample failing on rerun

I recorded my project website workflow on Jmeter. But On rerunning the recorded samples, all the samples having POST request are failing. I am unable to figure out why the same samples which were passing during recording, are failing on re-run.
Below is request of one of the samples which is failing:
Recorded sample request which passed:
POST https://example.com/live/v1/dashboards/promo_pa/ds/promo_program_dimensions
POST data:
{"query":"promo_program_dimensions.filterby(program_master_id = 'GOGGLE').filterby(dimension_name = 'channel').groupby(dimension_value).aggregate(count(dimension_value) as count).orderby(dimension_value+)"}
[no cookies]
Request Headers:
Connection: keep-alive
Referer: https://example.com/live/v1/dashboards/promo_pa/
Accept-Language: en-US,en;q=0.5
DNT: 1
Accept: */*
X-Requested-With: XMLHttpRequest
Content-Type: application/json
Accept-Encoding: gzip, deflate, br
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0
Content-Length: 216
Host: example.com
Sampler Result:
Thread Name:
Sample Start: 2018-02-22 17:32:44 IST
Load time: 93
Connect Time: 58
Latency: 93
Size in bytes: 647
Sent bytes:1095
Headers size in bytes: 645
Body size in bytes: 2
Sample Count: 1
Error Count: 0
Data type ("text"|"bin"|""): text
Response code: 200
Response message: OK
Response headers:
HTTP/1.1 200 OK
Server: nginx
Date: Thu, 22 Feb 2018 12:02:44 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 2
Connection: keep-alive
Cache-Control: no-cache, no-store, must-revalidate, public, max-age=0
Set-Cookie: live=.eJxNj11vgjAYhf_K0muzMLJdSOIFC6yBQJmuiO1Nw0cdtB0zUEAw_nfRZcbLN2_Oc85zAoGNHA9B9mlDF1gn8JQBCwTm8VD8xH0h3J7CjymFfk92vszHZZklxzpdr1bgvABBBKHrMA-x-MvdzEFVZbzRI1gAtm94WwJLNx2fr6q4wymWr9RRiuJ8iJJtRRLyQsytouJdULwREUQKJfGAkvBWkrfNnulfyes7IhTxQCGqiLkeIqeQaAqn0EElxa5B8feEoK-IkFesDLFnUMd-C4e_zVXBa13p8TntdMn0eODAqjulHj4PY8lua6RwOV6TXcubm8is2XP273q-AI7Dam4.DXBC5A.CJMLbN0B4HC4U8703ZQS50K00lk; HttpOnly; Path=/live
HTTPSampleResult fields:
ContentType: text/html; charset=utf-8
DataEncoding: utf-8
Request of the same sample which is failing on re-run:
POST https://example.com/live/v1/dashboards/promo_pa/ds/promo_program_dimensions
POST data:
{"query":"promo_program_dimensions.filterby(program_master_id = 'GOGGLE').filterby(dimension_name = 'channel').groupby(dimension_value).aggregate(count(dimension_value) as count).orderby(dimension_value+)"}
Cookie Data:
live=.eJxNj11vgjAYhf_K0muzuE4uJPHCBNZgaB0O1Pam4aOu5WsGCqMY__uYy4yXJ2_O857nAvw1cTyC-PsaucC-gKcE2MCHwzmroj7L3Z6htzFGm54eN0VqljI5DHUcrFbgOgP-FiHX4R7h0Ye7m4qlSkSjDZgBfmpEK4Gtm05MSWV3OK5YgR3XohXJcR4tyCgVzvdTSi0WUoshOt86HiRhcHuSts2J669C1HcEgdhgJ10wx3shI4a02uUYRiMNpSIwGFguCxyuzYR6ZaEs8SH4xp9_m1Umaq20eY47Lbk2ZwHsuivLh8vDWHrcz2O0NL_NrhXNTWTS7AX_d73-AAjCaeE.DXBNjA.Fy0Fs7zpVKg-f1qSbAljATOn64E
Request Headers:
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded
Content-Length: 216
Host: example.com
User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_161)
Sampler Result:
Thread Name: Liberty 1-1
Sample Start: 2018-02-22 18:24:46 IST
Load time: 26
Connect Time: 0
Latency: 26
Size in bytes: 709
Sent bytes:868
Headers size in bytes: 652
Body size in bytes: 57
Sample Count: 1
Error Count: 1
Data type ("text"|"bin"|""): text
Response code: 400
Response message: BAD REQUEST
Response headers:
HTTP/1.1 400 BAD REQUEST
Server: nginx
Date: Thu, 22 Feb 2018 12:54:46 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 57
Connection: keep-alive
Cache-Control: no-cache, no-store, must-revalidate, public, max-age=0
Set-Cookie: live=.eJxNj1tvgjAAhf_K0mezGAcPkvjg0q7B0DKciO1Lw6WGcpuBwizG_z50mfHx5ORcvgvw1hS6FIvPNUbAuYCXBDjAW5xPWR0OWYEGjj_GGG8GdtiUqVnmSXRu4mC1AtcZ8HyMERQuFeEX2k7BSiWy1QbMgDi2ssuBo9teTkplj3JS85JAZLOaFqQILTrmihT7SaU23zGbYzb3obugu-A-knbtUejvUjaPCh9Wio7vFY22ikBm0SKrCeSlDwOL79I3OpajjwOLRTRnUWh4jSz28_dZZbLRSpvXuNe50OYkgdP0VfXkPJ1lh_08xktzS_adbO8gE-YgxT_r9Rcq0WoP.DXBPFg.4Rll1tgU0GdWHWyE73uLkKM8z9c; HttpOnly; Path=/live
HTTPSampleResult fields:
ContentType: text/html; charset=utf-8
DataEncoding: utf-8
Response Data:
{"error": "Failed to authenticate user for data access."}
I have a login sample before this which passed successfully, So user has logged-in successfully before this sample.
I have used
HTTP Cache Manager, HTTP Cookie Manager and HTTP Header Manager. HTTP Cookie Manager will manage the session automatically. Still i am getting authentication error.
i have used the default settings for the sample i.e. "Redirect Automatically" and "Use KeepAlive". I am using JMeter 3.3
Appreciate any pointers.
In the "successful" request you have the following HTTP Headers:
X-Requested-With: XMLHttpRequest
Content-Type: application/json
In the "failing" one you have:
Content-Type: application/x-www-form-urlencoded
So my expectation is that you need to add HTTP Header Manager as a child of the "failing" request and configure it to send Content-Type header with the value of application/json

Firefox's geo.wifi.url's https://www.google.com/loc/json not used?

I used a network sniffer and examined all the requests going out from Firefox when going to http://html5demos.com/geo. According to my Firefox, the geolocation service according to geo.wifi.uri entry is https://www.google.com/loc/json. However I don't see this url in any of the requests.
What am I missing?
I see it in LiveHTTPHeaders:
https://www.google.com/loc/json
POST /loc/json HTTP/1.1
Host: www.google.com
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:2.0b12pre) Gecko/20110220 Firefox/4.0b12pre
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Content-Length: 42
Content-Type: text/plain; charset=UTF-8
Pragma: no-cache
Cache-Control: no-cache
{"version":"1.1.0","request_address":true}
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content-Encoding: gzip
Date: Mon, 21 Feb 2011 13:34:05 GMT
Expires: Mon, 21 Feb 2011 13:34:05 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Content-Length: 238
Server: GSE
If your wifi interface is enabled, Firefox sends to Google all the wifi signal strength around you in order to locate you (signals strength,mac addresses and locations of all private and public hotspots were captured by Google with their Street View's cars I guess).
Here is the full POST request captured with TcpCatcher (and its SSL mode)
POST /loc/json HTTP/1.1
Host: www.google.com
Content-Length: 4233
Pragma: no-cache
Cache-Control: no-cache
Content-Type: application/json
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.119 Safari/534.16
Accept-Encoding: gzip,deflate,sdch
Accept-Language: fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
{"access_token":"2:fHl0jGoQDeLFKfUn:sn0HJO00jOQV2334","host":"html5demos.com","radio_type":"unknown","request_address":false,"version":"1.1.0","wifi_towers":[{"age":0,"mac_address":"00-13-10-27-ec-ba","signal_strength":-82,"ssid":"linksys"},{"age":0,"mac_address":"00-14-bf-e2-b6-a3","signal_strength":-101,"ssid":"grepre2"},{"age":0,"mac_address":"00-17-33-9e-4d-a8","signal_strength":-94,"ssid":"NEUF_4DA4"},{"age":0,"mac_address":"00-17-33-cc-b5-10","signal_strength":-69,"ssid":"NEUF_B50C"},{"age":0,"mac_address":"00-17-33-cc-b5-11","signal_strength":-66,"ssid":"Neuf WiFi"},{"age":0,"mac_address":"00-17-33-cc-b5-12","signal_strength":-69,"ssid":"SFR WiFi Public"},{"age":0,"mac_address":"00-1a-2b-0e-66-74","signal_strength":-86,"ssid":"NUMERICABLE-AB1B"},{"age":0,"mac_address":"00-1f-33-47-c0-50","signal_strength":-80,"ssid":"SUPERMAN"},{"age":0,"mac_address":"00-1f-33-e0-1e-1f","signal_strength":-80,"ssid":"NUMERICABLE-5866"},{"age":0,"mac_address":"00-1f-9f-f4-1f-17","signal_strength":-90,"ssid":"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"},{"age":0,"mac_address":"02-81-31-a2-c4-98","signal_strength":-71,"ssid":"wifi"},{"age":0,"mac_address":"02-81-31-a2-c4-99","signal_strength":-69},{"age":0,"mac_address":"02-81-31-a2-c4-9a","signal_strength":-68,"ssid":"FreeWifi"},{"age":0,"mac_address":"02-81-31-a2-c4-9b","signal_strength":-69,"ssid":"freephonie"},{"age":0,"mac_address":"06-20-9f-00-3d-24","signal_strength":-82,"ssid":"damiconexion"},{"age":0,"mac_address":"06-20-9f-00-3d-25","signal_strength":-82},{"age":0,"mac_address":"06-20-9f-00-3d-26","signal_strength":-81,"ssid":"FreeWifi"},{"age":0,"mac_address":"06-20-9f-00-3d-27","signal_strength":-82,"ssid":"freephonie"},{"age":0,"mac_address":"26-b7-bb-70-e1-d8","signal_strength":-93,"ssid":"DC_baby"},{"age":0,"mac_address":"26-b7-bb-70-e1-d9","signal_strength":-91},{"age":0,"mac_address":"26-b7-bb-70-e1-da","signal_strength":-89,"ssid":"FreeWifi"},{"age":0,"mac_address":"26-b7-bb-70-e1-db","signal_strength":-94,"ssid":"freephonie"},{"age":0,"mac_address":"26-f8-5c-ec-bc-a4","signal_strength":-80},{"age":0,"mac_address":"26-f8-5c-ec-bc-a5","signal_strength":-80},{"age":0,"mac_address":"26-f8-5c-ec-bc-a6","signal_strength":-81,"ssid":"FreeWifi"},{"age":0,"mac_address":"26-f8-5c-ec-bc-a7","signal_strength":-80,"ssid":"freephonie"},{"age":0,"mac_address":"30-46-9a-43-fc-e5","signal_strength":-84,"ssid":"DartyBox_98DE"},{"age":0,"mac_address":"32-46-9a-43-fc-e6","signal_strength":-84,"ssid":"DartyBox_98DE_WEP"},{"age":0,"mac_address":"4e-0a-94-3d-d6-38","signal_strength":-82,"ssid":"neko"},{"age":0,"mac_address":"4e-0a-94-3d-d6-39","signal_strength":-82},{"age":0,"mac_address":"4e-0a-94-3d-d6-3a","signal_strength":-80,"ssid":"FreeWifi"},{"age":0,"mac_address":"4e-0a-94-3d-d6-3b","signal_strength":-82},{"age":0,"mac_address":"5c-33-8e-eb-6c-c0","signal_strength":-87,"ssid":"Livebox-0510"},{"age":0,"mac_address":"72-f5-aa-cd-b7-e4","signal_strength":-86,"ssid":"Kermazeguen"},{"age":0,"mac_address":"72-f5-aa-cd-b7-e5","signal_strength":-87},{"age":0,"mac_address":"72-f5-aa-cd-b7-e6","signal_strength":-87,"ssid":"FreeWifi"},{"age":0,"mac_address":"72-f5-aa-cd-b7-e7","signal_strength":-88,"ssid":"freephonie"},{"age":0,"mac_address":"76-a6-a6-5a-90-c8","signal_strength":-78,"ssid":"pipiou_wifi"},{"age":0,"mac_address":"76-a6-a6-5a-90-c9","signal_strength":-79},{"age":0,"mac_address":"76-a6-a6-5a-90-ca","signal_strength":-77,"ssid":"FreeWifi"},{"age":0,"mac_address":"76-a6-a6-5a-90-cb","signal_strength":-78},{"age":0,"mac_address":"86-9c-8f-a0-ac-e4","signal_strength":-78,"ssid":"touhere"},{"age":0,"mac_address":"86-9c-8f-a0-ac-e5","signal_strength":-82},{"age":0,"mac_address":"86-9c-8f-a0-ac-e6","signal_strength":-83,"ssid":"FreeWifi"},{"age":0,"mac_address":"86-9c-8f-a0-ac-e7","signal_strength":-82,"ssid":"freephonie"},{"age":0,"mac_address":"c0-3f-0e-b6-9a-37","signal_strength":-64,"ssid":"NUMERICABLE-825A"},{"age":0,"mac_address":"da-0f-67-af-23-10","signal_strength":-71,"ssid":"freeboxtomseb"},{"age":0,"mac_address":"da-0f-67-af-23-11","signal_strength":-70},{"age":0,"mac_address":"da-0f-67-af-23-12","signal_strength":-71,"ssid":"FreeWifi"},{"age":0,"mac_address":"da-0f-67-af-23-13","signal_strength":-71}]}
google json has stop service.
you can call [minigps]: http://www.minigps.net/map.html "click to query" could use google json api, only change the ip to: http://www.minigps.net/minigps/map/google/location
fllow is the http bytes:
URL:http://www.minigps.net/minigps/map/google/location
Request Method:POST
Status Code:200 OK
Request Headersview source
Accept:application/json, text/javascript, */*; q=0.01
Accept-Charset:GBK,utf-8;q=0.7,*;q=0.3
Accept-Encoding:gzip,deflate,sdch
Accept-Language:zh-CN,zh;q=0.8
Connection:keep-alive
Content-Length:191
Content-Type:application/json; charset=UTF-8
Cookie:bdshare_firstime=1356366713546; JSESSIONID=68243935CD3355089CF07A3A22AAB372
Host:www.minigps.net
Origin:http://www.minigps.net
Referer:http://www.minigps.net/map.html
User-Agent:Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4
X-Requested-With:XMLHttpRequest
Request Payload
{"version":"1.1.0","host":"maps.google.com","cell_towers": [{"cell_id":"3721","location_area_code":"9779","mobile_country_code":"460","mobile_network_c ode":"0","age":0,"signal_strength":-65}]}
Response Headersview source
Content-Type:application/json
Date:Sat, 12 Jan 2013 06:03:15 GMT
Server:Apache-Coyote/1.1
Transfer-Encoding:chunked
Note: I'm affiliated with minigps.net.

Resources