小编mat*_*att的帖子

nodeJS - 发出 HTTPS 请求,发送 JSON 数据

我想将 HTTPS POST 从一个 nodeJS 服务器发送到另一个。我有一些 JSON 数据要随此请求发送(由 html 表单填充)。

我怎样才能做到这一点?我知道 https.request() 但似乎没有将 JSON 作为查询的一部分包含在内的选项。根据我的研究,HTTP 请求似乎可以,但 HTTPS 请求不行。我该如何解决这个问题?

const pug = require('pug');
var cloudinary = require('cloudinary');
var express = require('express');
var multer = require('multer');
var upload = multer({ dest: 'uploads/' });
var request = require('request');
var bodyParser = require('body-parser');

var options = {
 hostname: 'ec2-54-202-139-197.us-west-2.compute.amazonaws.com',
 port: 443,
 path: '/',
 method: 'GET'
};

var app = express();
var parser = bodyParser.raw();
app.use(parser);

app.set('view engine', 'pug');

app.get('/', upload.single('avatar'), function(req, res) {
 return …
Run Code Online (Sandbox Code Playgroud)

https json node.js

2
推荐指数
1
解决办法
1万
查看次数

CSS / HTML-悬停时出现流浪破折号

我在包含产品合作伙伴徽标的网站上有一节。总共约有28个徽标-其中10个是指向单独产品页面的链接。当我将鼠标悬停在它们上方时,右下角会出现一个破折号,并且我找不到它的来源,这使我发疯。它出现在除最后一个链接的所有链接徽标图像上-再次,我看不到与该徽标图像的区别。这就是我的意思-

带有破折号的徽标出现

带破折号

无破折号

没有

它看起来像是一页代码中的破折号,但我什么都看不到-

partners.php

<div class="row">
  <div id="partnerimages" class="col-md">
    <a href="<?php the_permalink(76); ?>" id="adia">
      <?php if( get_field('axe_img') ): ?>
      <img src="<?php the_field('axe_img'); ?>" />
      <?php endif; ?>
    </a>
    <?php if( get_field('beachrotana_img') ): ?>
    <img src="<?php the_field('beachrotana_img'); ?>" />
    <?php endif; ?>
    <a href="<?php the_permalink(78); ?>" id="adia">
      <?php if( get_field('bloom_img') ): ?>
      <img src="<?php the_field('bloom_img'); ?>" />
      <?php endif; ?>
    </a>
    <a href="<?php the_permalink(80); ?>" id="adia">
      <?php if( get_field('bodytree_img') ): ?>
      <img src="<?php the_field('bodytree_img'); ?>" />
      <?php endif; ?>
    </a> …
Run Code Online (Sandbox Code Playgroud)

html css wordpress css3

-1
推荐指数
1
解决办法
112
查看次数

标签 统计

css ×1

css3 ×1

html ×1

https ×1

json ×1

node.js ×1

wordpress ×1