2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

fiddler2のcomposerでファイル送信

Posted at

リクエストヘッダ

POST http://www.example.com/ HTTP/1.1
Host: www.example.com
Content-Type: multipart/form-data; boundary=----AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

リクエストボディ

------AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Content-Disposition: form-data; name="comment"

testcomment
------AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Content-Disposition: form-data; name="file"; filename="test.extension"
Content-Type: application/octet-stream

<@INCLUDE *C:\Project\test.extension*@>
------AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA--

説明

1ブロック目:パラメータを送る
2ブロック目:ファイルを送る

ハイフンの数に注意
ボディの各boundaryの前に--が多く、最後に--が付く
送信するファイルの適切な形式のContent-Typeがあれば適宜設定

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?