Delphi-Indy在72字符处添加等号,如何实现长尾词表单数据POST?

2026-04-10 20:583阅读0评论SEO教程
  • 内容介绍
  • 文章标签
  • 相关推荐

本文共计357个文字,预计阅读时间需要2分钟。

Delphi-Indy在72字符处添加等号,如何实现长尾词表单数据POST?

使用Delphi XE和Indy库,我成功编写了将数据提交到Web表单的代码。代码如下:

delphivar TidHttp: TIdHTTP; postData: TIdMultiPartFormDataStream;begin TidHttp :=TIdHTTP.create; postData :=TIdMultiPartFormDataStream.Create; try postData.AddFormField('name', edName.text); postData.AddFormField('email', edEmail.text); // ... 其他代码 finally postData.Free; TidHttp.Free; end;end;

使用Delphi XE和Indy,我得到了一些提交到Web表单的代码.

idwww.example.com/contact.php', postData); ShowMessage('Thank you for your contact us.'); finally postData.Free; idHttp.Free; end;

但是,当我在描述备忘录中输入类似的内容时.

This is a really long descriptie piece of text so we can see just how it's wrapping these lines and what it's doig to them I think it's making a hash of it. Argh waht a pain.

我明白了

This is a really long descriptie piece of text so we can see just how = it's wrapping these lines and what it's doig to them I think it's maki= ng a hash of it. Argh waht a pain.

所以对我来说似乎是自动换行,=
有线索的人吗?

Delphi-Indy在72字符处添加等号,如何实现长尾词表单数据POST?

你看到的是正确的行为. TIdFormDataField.ContentTransfer属性默认为文本字段的quoted-printable.这正是您所看到的编码类型.在quoted-printable中,sole =字符后跟换行符称为“软”断点.这就是MIME如何分解长行文本以适应各种协议(如电子邮件)中的行长度限制.

您可以将ContentTransfer属性更改为以下任何受支持的值:

>一个空白字符串
> 7bit
> 8位
>二进制
>引用可打印
> base64

如果您不希望对文本进行编码,请将ContentTransfer属性设置为quoted-printable或base64以外的任何值.

本文共计357个文字,预计阅读时间需要2分钟。

Delphi-Indy在72字符处添加等号,如何实现长尾词表单数据POST?

使用Delphi XE和Indy库,我成功编写了将数据提交到Web表单的代码。代码如下:

delphivar TidHttp: TIdHTTP; postData: TIdMultiPartFormDataStream;begin TidHttp :=TIdHTTP.create; postData :=TIdMultiPartFormDataStream.Create; try postData.AddFormField('name', edName.text); postData.AddFormField('email', edEmail.text); // ... 其他代码 finally postData.Free; TidHttp.Free; end;end;

使用Delphi XE和Indy,我得到了一些提交到Web表单的代码.

idwww.example.com/contact.php', postData); ShowMessage('Thank you for your contact us.'); finally postData.Free; idHttp.Free; end;

但是,当我在描述备忘录中输入类似的内容时.

This is a really long descriptie piece of text so we can see just how it's wrapping these lines and what it's doig to them I think it's making a hash of it. Argh waht a pain.

我明白了

This is a really long descriptie piece of text so we can see just how = it's wrapping these lines and what it's doig to them I think it's maki= ng a hash of it. Argh waht a pain.

所以对我来说似乎是自动换行,=
有线索的人吗?

Delphi-Indy在72字符处添加等号,如何实现长尾词表单数据POST?

你看到的是正确的行为. TIdFormDataField.ContentTransfer属性默认为文本字段的quoted-printable.这正是您所看到的编码类型.在quoted-printable中,sole =字符后跟换行符称为“软”断点.这就是MIME如何分解长行文本以适应各种协议(如电子邮件)中的行长度限制.

您可以将ContentTransfer属性更改为以下任何受支持的值:

>一个空白字符串
> 7bit
> 8位
>二进制
>引用可打印
> base64

如果您不希望对文本进行编码,请将ContentTransfer属性设置为quoted-printable或base64以外的任何值.