Copy as cURL(cmd) adds invalid characters to form data
up vote
0
down vote
favorite
I want to use Postman to test server side validation so I used the browser to submit (valid) data to the server and in the network tab of Chromes developer tools used "Copy as cURL". Then, in Postman, Import->Paste Raw Text -> Import.
If I look at the request body the data appears on x-www-form-urlencoded
tab and every value has a '^
' character appended to it. e.g. JobId: 75051^
When I post it the server validation picks it up as invalid data e.g.
The value "75051^" is not valid for JobId
Edit
If I use "Copy as C=cURL(bash)" instead, the ^
characters are removed but the server doesn't like the encoding used on dates and times. e.g. T
The value '11%2F19%2F2018+12%3A15+AM' is not valid for Work Start Time
What is going on here? Can I get "Copy as cURL" to pick up my data correctly, or is there a better way to pick up the request and get it into Postman?
google-chrome-devtools postman
add a comment |
up vote
0
down vote
favorite
I want to use Postman to test server side validation so I used the browser to submit (valid) data to the server and in the network tab of Chromes developer tools used "Copy as cURL". Then, in Postman, Import->Paste Raw Text -> Import.
If I look at the request body the data appears on x-www-form-urlencoded
tab and every value has a '^
' character appended to it. e.g. JobId: 75051^
When I post it the server validation picks it up as invalid data e.g.
The value "75051^" is not valid for JobId
Edit
If I use "Copy as C=cURL(bash)" instead, the ^
characters are removed but the server doesn't like the encoding used on dates and times. e.g. T
The value '11%2F19%2F2018+12%3A15+AM' is not valid for Work Start Time
What is going on here? Can I get "Copy as cURL" to pick up my data correctly, or is there a better way to pick up the request and get it into Postman?
google-chrome-devtools postman
1
^
is a cmd batch language escape symbol. It's added when you choose "Copy as cURL (cmd)". I think this is a bug in Chrome caused by the lack of understanding that the escape is not needed inside double-quoted strings. See if you can use "Copy as cURL (bash)" instead.
– wOxxOm
Nov 19 at 17:37
@wOxxOm - see my edit, it helps. But still something odd about the encoding
– Colin
Nov 19 at 18:01
Might be easier to remove all those^
especially by using a scripting utility like AutoHotkey to bind Ctrl-V to a simple string replacement on clipboard when invoked in a Postman window.
– wOxxOm
Nov 20 at 6:24
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I want to use Postman to test server side validation so I used the browser to submit (valid) data to the server and in the network tab of Chromes developer tools used "Copy as cURL". Then, in Postman, Import->Paste Raw Text -> Import.
If I look at the request body the data appears on x-www-form-urlencoded
tab and every value has a '^
' character appended to it. e.g. JobId: 75051^
When I post it the server validation picks it up as invalid data e.g.
The value "75051^" is not valid for JobId
Edit
If I use "Copy as C=cURL(bash)" instead, the ^
characters are removed but the server doesn't like the encoding used on dates and times. e.g. T
The value '11%2F19%2F2018+12%3A15+AM' is not valid for Work Start Time
What is going on here? Can I get "Copy as cURL" to pick up my data correctly, or is there a better way to pick up the request and get it into Postman?
google-chrome-devtools postman
I want to use Postman to test server side validation so I used the browser to submit (valid) data to the server and in the network tab of Chromes developer tools used "Copy as cURL". Then, in Postman, Import->Paste Raw Text -> Import.
If I look at the request body the data appears on x-www-form-urlencoded
tab and every value has a '^
' character appended to it. e.g. JobId: 75051^
When I post it the server validation picks it up as invalid data e.g.
The value "75051^" is not valid for JobId
Edit
If I use "Copy as C=cURL(bash)" instead, the ^
characters are removed but the server doesn't like the encoding used on dates and times. e.g. T
The value '11%2F19%2F2018+12%3A15+AM' is not valid for Work Start Time
What is going on here? Can I get "Copy as cURL" to pick up my data correctly, or is there a better way to pick up the request and get it into Postman?
google-chrome-devtools postman
google-chrome-devtools postman
edited Nov 19 at 18:00
asked Nov 19 at 16:56
Colin
16.5k1481148
16.5k1481148
1
^
is a cmd batch language escape symbol. It's added when you choose "Copy as cURL (cmd)". I think this is a bug in Chrome caused by the lack of understanding that the escape is not needed inside double-quoted strings. See if you can use "Copy as cURL (bash)" instead.
– wOxxOm
Nov 19 at 17:37
@wOxxOm - see my edit, it helps. But still something odd about the encoding
– Colin
Nov 19 at 18:01
Might be easier to remove all those^
especially by using a scripting utility like AutoHotkey to bind Ctrl-V to a simple string replacement on clipboard when invoked in a Postman window.
– wOxxOm
Nov 20 at 6:24
add a comment |
1
^
is a cmd batch language escape symbol. It's added when you choose "Copy as cURL (cmd)". I think this is a bug in Chrome caused by the lack of understanding that the escape is not needed inside double-quoted strings. See if you can use "Copy as cURL (bash)" instead.
– wOxxOm
Nov 19 at 17:37
@wOxxOm - see my edit, it helps. But still something odd about the encoding
– Colin
Nov 19 at 18:01
Might be easier to remove all those^
especially by using a scripting utility like AutoHotkey to bind Ctrl-V to a simple string replacement on clipboard when invoked in a Postman window.
– wOxxOm
Nov 20 at 6:24
1
1
^
is a cmd batch language escape symbol. It's added when you choose "Copy as cURL (cmd)". I think this is a bug in Chrome caused by the lack of understanding that the escape is not needed inside double-quoted strings. See if you can use "Copy as cURL (bash)" instead.– wOxxOm
Nov 19 at 17:37
^
is a cmd batch language escape symbol. It's added when you choose "Copy as cURL (cmd)". I think this is a bug in Chrome caused by the lack of understanding that the escape is not needed inside double-quoted strings. See if you can use "Copy as cURL (bash)" instead.– wOxxOm
Nov 19 at 17:37
@wOxxOm - see my edit, it helps. But still something odd about the encoding
– Colin
Nov 19 at 18:01
@wOxxOm - see my edit, it helps. But still something odd about the encoding
– Colin
Nov 19 at 18:01
Might be easier to remove all those
^
especially by using a scripting utility like AutoHotkey to bind Ctrl-V to a simple string replacement on clipboard when invoked in a Postman window.– wOxxOm
Nov 20 at 6:24
Might be easier to remove all those
^
especially by using a scripting utility like AutoHotkey to bind Ctrl-V to a simple string replacement on clipboard when invoked in a Postman window.– wOxxOm
Nov 20 at 6:24
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
I found a better way to pick up the request and get it into Postman:
- Install the Postman Chrome App instead of the desktop
app. - Install the Postman Interceptor Extension.
- Open Postman and click on the Interceptor icon in the toolbar to switch the
toggle to “on”. - Browse to your website: the requests appear in Postman's history.
- Go to Interceptor missing from native apps #1667 and vote for it
Reference:
Postman Interceptor Extension Documentation
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
I found a better way to pick up the request and get it into Postman:
- Install the Postman Chrome App instead of the desktop
app. - Install the Postman Interceptor Extension.
- Open Postman and click on the Interceptor icon in the toolbar to switch the
toggle to “on”. - Browse to your website: the requests appear in Postman's history.
- Go to Interceptor missing from native apps #1667 and vote for it
Reference:
Postman Interceptor Extension Documentation
add a comment |
up vote
0
down vote
I found a better way to pick up the request and get it into Postman:
- Install the Postman Chrome App instead of the desktop
app. - Install the Postman Interceptor Extension.
- Open Postman and click on the Interceptor icon in the toolbar to switch the
toggle to “on”. - Browse to your website: the requests appear in Postman's history.
- Go to Interceptor missing from native apps #1667 and vote for it
Reference:
Postman Interceptor Extension Documentation
add a comment |
up vote
0
down vote
up vote
0
down vote
I found a better way to pick up the request and get it into Postman:
- Install the Postman Chrome App instead of the desktop
app. - Install the Postman Interceptor Extension.
- Open Postman and click on the Interceptor icon in the toolbar to switch the
toggle to “on”. - Browse to your website: the requests appear in Postman's history.
- Go to Interceptor missing from native apps #1667 and vote for it
Reference:
Postman Interceptor Extension Documentation
I found a better way to pick up the request and get it into Postman:
- Install the Postman Chrome App instead of the desktop
app. - Install the Postman Interceptor Extension.
- Open Postman and click on the Interceptor icon in the toolbar to switch the
toggle to “on”. - Browse to your website: the requests appear in Postman's history.
- Go to Interceptor missing from native apps #1667 and vote for it
Reference:
Postman Interceptor Extension Documentation
answered Nov 20 at 8:22
Colin
16.5k1481148
16.5k1481148
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53379356%2fcopy-as-curlcmd-adds-invalid-characters-to-form-data%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
^
is a cmd batch language escape symbol. It's added when you choose "Copy as cURL (cmd)". I think this is a bug in Chrome caused by the lack of understanding that the escape is not needed inside double-quoted strings. See if you can use "Copy as cURL (bash)" instead.– wOxxOm
Nov 19 at 17:37
@wOxxOm - see my edit, it helps. But still something odd about the encoding
– Colin
Nov 19 at 18:01
Might be easier to remove all those
^
especially by using a scripting utility like AutoHotkey to bind Ctrl-V to a simple string replacement on clipboard when invoked in a Postman window.– wOxxOm
Nov 20 at 6:24