urlencoded请求是什么意思?

时间:2018-11-28 16:19:23

标签: http express body-parser

实际上,我正在与Express合作。我在项目中遇到了express.json()和express.urlencoded()。我想知道什么是urlencoded请求?

1 个答案:

答案 0 :(得分:0)

这很可能是指 } @Override public void onProgress(Router router, int progress, int routeIndex) { // update progress } @Override public void onComputeStarted(Router router) { } @SuppressLint("SetTextI18n") @Override public void onPrimaryComputeFinished(Router router, com.sygic.sdk.route.RouteInfo routeInfo) { mapRoutePrimary = new MapRoute(routeInfo, MapRoute.RouteType.Primary); // routeInfo is obtained via onPrimaryComputeFinished() method in RouteComputeListener mpView.addMapObject(mapRoutePrimary); } @Override public void onAlternativeComputeFinished(Router router, com.sygic.sdk.route.RouteInfo routeInfo) { mapRouteAlternative = new MapRoute(routeInfo, MapRoute.RouteType.Alternative); // routeInfo is obtained via onAlternativeComputeFinished() method in RouteComputeListener mpView.addMapObject(mapRouteAlternative); for (RouteManeuver maneuver : routeInfo.getManeuvers()) { directionText.setText(maneuver.getType()+" "+directionText.getText()); } } @Override public void onComputeFinished(Router router) { NavigationManager.getInstance().setRouteForNavigation(mapRoutePrimary.getRouteInfo()); if (mapRouteAlternative!=null) mapRoutePrimary.getRouteInfo().getBoundingBox().union(mapRouteAlternative.getRouteInfo().getBoundingBox()); Objects.requireNonNull(mpView.getCamera()).setMapRectangleWithMargin(mapRoutePrimary.getRouteInfo().getBoundingBox(),mapAnimation,15,15,15,15); NavigationManager.getInstance().addOnDirectionListener(new NavigationManager.OnDirectionListener() { @Override public void onDirectionInfoChanged(@NonNull DirectionInfo directionInfo) { final int distance = directionInfo.getDistance(); final int nextDistance = directionInfo.getNextDistance(); final RouteManeuver primaryManeuver = directionInfo.getPrimary(); if (primaryManeuver != null) { final int type = primaryManeuver.getType(); final String roadName = primaryManeuver.getRoadName(); final String nextRoadName = primaryManeuver.getNextRoadName(); directionText.setText(roadName); Log.d("directions", "direction of type " + type + " on the road " + roadName + ". Next road is " + nextRoadName); //Toast.makeText(getApplicationContext(), "direction of type " + type + " on the road " + roadName + ". Next road is " + nextRoadName,Toast.LENGTH_LONG).show(); } } }); } @Override public void onRecomputeStarted() { // called when recompute was invoked. Recompute can be invoked after leaving computed route mpView.removeMapObject(mapRoutePrimary); } @Override public void onRecomputeFinished(com.sygic.sdk.route.RouteInfo routeInfo, int i) { mpView.removeMapObject(mapRoutePrimary); mapRoutePrimary = new MapRoute(routeInfo, MapRoute.RouteType.Primary); mpView.addMapObject(mapRoutePrimary); } }; application/x-www-form-urlencoded的主体,例如:

Content-Type

与JSON编码的主体相对,例如:

firstname=John&lastname=Smith