parameters: (url, picture)
return_statement: return HTTPRequest(url=url, method="POST",
                            body=body, headers=headers)
docstring: Construct a POST request from a picture and its thumbnail.
docstring_summary: Construct a POST request from a picture and its thumbnail.
docstring_tokens: Construct a POST request from a picture and its thumbnail .
function: def get_picture_upload_request(url, picture):
      '''
      Construct a POST request from a picture and its thumbnail.
      '''
  
      fields = {"json": str(picture.toJson(localized=False))}
      files = [("picture", str(picture.path),
                  picture.fetch_attachment("th_" + picture.path))]
      (contentType, body) = encode_multipart_formdata(fields=fields,
                                                      files=files)
      headers = {'Content-Type': contentType}
  
      return HTTPRequest(url=url, method="POST",
                            body=body, headers=headers)
function_tokens: def get_picture_upload_request ( url , picture ) : fields = { "json" : str ( picture . toJson ( localized = False ) ) } files = [ ( "picture" , str ( picture . path ) , picture . fetch_attachment ( "th_" + picture . path ) ) ] ( contentType , body ) = encode_multipart_formdata ( fields = fields , files = files ) headers = { 'Content-Type' : contentType } return HTTPRequest ( url = url , method = "POST" , body = body , headers = headers )