I’m not familiar with Unreal, but you can play around with curl or Postman or any http client of your choice to try out different request settings. For example:
I’m not sure how FStrings and TEXT() work, but I’d try hard-coding the url and api key without any variables or string concat to make sure you’re constructing the request correctly.
@James_Yang@Vadim_Pechenkin1 Looks like Unreal’s FCurlHttpRequest sends “Content-Length: 0” which is not very common and this thing freaks out the Figma API, I tried to skip that part in the debugger and got the response successfully!
// Source\Runtime\Online\HTTP\Private\Curl\CurlHttp.cpp:791 (FCurlHttpRequest::SetupRequest)
// content-length should be present http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.4
if (GetHeader(TEXT("Content-Length")).IsEmpty())
{
SetHeader(TEXT("Content-Length"), FString::Printf(TEXT("%d"), RequestPayload->GetContentLength()));
}
We looked into this and it is not possible to ignore Content-Length: 0 headers on GET requests. This behavior comes as part of a bundle of checks for HTTP desync mitigation in our application load balancer, and we cannot selectively disable individual checks.
So the recommendation going forward is to apply the workaround above, or to remove the Content-Length header from the request.