My bad, I thought from multipart data it was obvious. What I wanted to do was 
like this
    
    
    import httpclient
    
    var data = newMultipartData({
      "data1": "value1",
      "data2": "value2",
      "data3": "value3"
    })
    
    var customHeaders = newHttpHeaders({
      "Content-Type": "multipart/form-data"
      "Custom-Key-1": "Custom-Value-1"
    })
    
    let theurl = "http://someurl.com";
    var client = newHttpClient()
    
    echo client.postContent(theurl, multipart=data)
    # where to put `customHeaders` in postContent proc?
    
    var response = client.request(theurl, httpMethod=HttpPost, body=$data,
      headers=customHeaders)
    # no `$` proc defined for multipart type, cannot use request proc
    

>From this [SO 
>page](https://stackoverflow.com/questions/4526273/what-does-enctype-multipart-form-data-mean/28380690#28380690)
> , somehow I solved it.

I think what I wanted to ask was a way to stringify MultipartData type.

Thanks.

Reply via email to