HI Proj,
I am trying to create the equivalent lwp request of following curl. But not sure how to pass -d data in lwp.
curl -v <MY URL> -H "Authorization: Bearer <TOKEN>" -d '{"x": "y", "H": {"id": "0"}}' -X OPTIONS
code I tried :
my $request = HTTP::Request->new(OPTIONS => $self->{url});
$res = $ua->request( $request ,Content => encode_json $body);
Method 2:-
my $request = HTTP::Request->new(OPTIONS => $self->{url},%$body);
$res = $ua->request( $request );
Both didnt work.