How to send a base64 image in postman

前端 未结 1 822
Happy的楠姐
Happy的楠姐 2021-02-07 01:24

Need to make a request to a api with a image encoded in base64, the request is a put, and i was trying making in the body section using the raw format and adding i.e. this json:

1条回答
  •  臣服心动
    2021-02-07 02:04

    You could find online base64 image encoder. They encode an image to a string.

    The example of raw body in JSON format in the POSTMAN:

    "profile": {
        "first_name": "John",
        "last_name": "Dow",
        "photo": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII="
    }
    

    I think, that "name" and "content_type" is obvious in your JSON.

    0 讨论(0)
提交回复
热议问题